Skip to content

Commit 8c95555

Browse files
committed
tests: fix failed matching due to django-configuration deprecation warnings
1 parent 7589394 commit 8c95555

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

tests/test_db_access_in_repr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_via_db_fixture(db):
2121
"tpkg/test_the_test.py:8: ",
2222
'self = *RuntimeError*Database access not allowed*',
2323
"E *DoesNotExist: Item matching query does not exist.",
24-
"* 2 failed in *",
24+
"* 2 failed*",
2525
])
2626
assert "INTERNALERROR" not in str(result.stdout) + str(result.stderr)
2727
assert result.ret == 1

tests/test_db_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def test_inner_migrations():
480480
)
481481
assert result.ret == 0
482482
assert "Operations to perform:" not in result.stdout.str()
483-
result.stdout.fnmatch_lines(["*= 1 passed in *"])
483+
result.stdout.fnmatch_lines(["*= 1 passed*"])
484484

485485
def test_migrations_run(self, django_testdir):
486486
testdir = django_testdir

tests/test_django_configurations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_settings():
4242
result = testdir.runpytest_subprocess()
4343
result.stdout.fnmatch_lines([
4444
'django: settings: tpkg.settings_env (from env), configuration: MySettings (from env)',
45-
"* 1 passed in*",
45+
"* 1 passed*",
4646
])
4747
assert result.ret == 0
4848

@@ -73,7 +73,7 @@ def test_ds():
7373
result = testdir.runpytest_subprocess()
7474
result.stdout.fnmatch_lines([
7575
'django: settings: tpkg.settings_env (from env), configuration: MySettings (from env)',
76-
"* 1 passed in*",
76+
"* 1 passed*",
7777
])
7878
assert result.ret == 0
7979

@@ -103,7 +103,7 @@ def test_ds():
103103
result = testdir.runpytest_subprocess()
104104
result.stdout.fnmatch_lines([
105105
'django: settings: tpkg.settings_ini (from ini), configuration: MySettings (from ini)',
106-
"* 1 passed in*",
106+
"* 1 passed*",
107107
])
108108
assert result.ret == 0
109109

@@ -135,6 +135,6 @@ def test_ds():
135135
result.stdout.fnmatch_lines([
136136
'django: settings: tpkg.settings_opt (from option),'
137137
' configuration: MySettings (from option)',
138-
"* 1 passed in*",
138+
"* 1 passed*",
139139
])
140140
assert result.ret == 0

tests/test_django_settings_module.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_ds():
3939
result = testdir.runpytest_subprocess()
4040
result.stdout.fnmatch_lines([
4141
"django: settings: tpkg.settings_ini (from ini)",
42-
"*= 1 passed in *",
42+
"*= 1 passed*",
4343
])
4444
assert result.ret == 0
4545

@@ -60,7 +60,7 @@ def test_settings():
6060
result = testdir.runpytest_subprocess()
6161
result.stdout.fnmatch_lines([
6262
"django: settings: tpkg.settings_env (from env)",
63-
"*= 1 passed in *",
63+
"*= 1 passed*",
6464
])
6565

6666

@@ -86,7 +86,7 @@ def test_ds():
8686
result = testdir.runpytest_subprocess("--ds=tpkg.settings_opt")
8787
result.stdout.fnmatch_lines([
8888
"django: settings: tpkg.settings_opt (from option)",
89-
"*= 1 passed in *",
89+
"*= 1 passed*",
9090
])
9191

9292

@@ -137,7 +137,7 @@ def test_ds_after_user_conftest(testdir, monkeypatch):
137137
testdir.makepyfile(settings_after_conftest="SECRET_KEY='secret'")
138138
# testdir.makeconftest("import sys; print(sys.path)")
139139
result = testdir.runpytest_subprocess("-v")
140-
result.stdout.fnmatch_lines(["* 1 passed in*"])
140+
result.stdout.fnmatch_lines(["* 1 passed*"])
141141
assert result.ret == 0
142142

143143

@@ -225,7 +225,7 @@ def test_user_count():
225225
"""
226226
)
227227
result = testdir.runpython(p)
228-
result.stdout.fnmatch_lines(["* 4 passed in*"])
228+
result.stdout.fnmatch_lines(["* 4 passed*"])
229229

230230

231231
def test_settings_in_hook(testdir, monkeypatch):
@@ -274,7 +274,7 @@ def test_settings():
274274
"""
275275
)
276276
result = testdir.runpytest_subprocess()
277-
result.stdout.fnmatch_lines(["* 1 passed in*"])
277+
result.stdout.fnmatch_lines(["* 1 passed*"])
278278
assert result.ret == 0
279279

280280

tests/test_fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ class Migration(migrations.Migration):
564564
)
565565

566566
result = django_testdir.runpytest_subprocess("-s")
567-
result.stdout.fnmatch_lines(["* 1 passed in*"])
567+
result.stdout.fnmatch_lines(["* 1 passed*"])
568568
assert result.ret == 0
569569

570570

tests/test_initialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_ds():
5454
"conftest",
5555
"pytest_configure: conftest",
5656
"pytest_configure: plugin",
57-
"* 1 passed in*",
57+
"* 1 passed*",
5858
]
5959
)
6060
assert result.ret == 0

tests/test_unittest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def test_bar(self):
9797
'> assert 0, "trigger_error"',
9898
"E AssertionError: trigger_error",
9999
"E assert 0",
100-
"*= 1 failed, 1 passed in *",
100+
"*= 1 failed, 1 passed*",
101101
]
102102
)
103103
assert result.ret == 1
@@ -399,7 +399,7 @@ def test_noop(self):
399399

400400
result = django_testdir.runpytest_subprocess("-q", "-s")
401401
result.stdout.fnmatch_lines(
402-
["*FooBarTestCase.setUpClass*", "*test_noop*", "1 passed in*"]
402+
["*FooBarTestCase.setUpClass*", "*test_noop*", "1 passed*"]
403403
)
404404
assert result.ret == 0
405405

@@ -484,5 +484,5 @@ def test_method(self):
484484
)
485485

486486
result = django_testdir.runpytest_subprocess("--pdb")
487-
result.stdout.fnmatch_lines(["*= 1 passed in *"])
487+
result.stdout.fnmatch_lines(["*= 1 passed*"])
488488
assert result.ret == 0

0 commit comments

Comments
 (0)