Skip to content

Commit ce58006

Browse files
committed
tests: harden assertions (no warnings etc)
1 parent ce5d5bc commit ce58006

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

tests/test_django_configurations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_settings():
4040
"""
4141
)
4242
result = testdir.runpytest_subprocess()
43-
result.stdout.fnmatch_lines(["*1 passed*"])
43+
result.stdout.fnmatch_lines(["* 1 passed in*"])
4444
assert result.ret == 0
4545

4646

@@ -68,7 +68,7 @@ def test_ds():
6868
"""
6969
)
7070
result = testdir.runpytest_subprocess()
71-
result.stdout.fnmatch_lines(["*1 passed*"])
71+
result.stdout.fnmatch_lines(["* 1 passed in*"])
7272
assert result.ret == 0
7373

7474

@@ -96,5 +96,5 @@ def test_ds():
9696
"""
9797
)
9898
result = testdir.runpytest_subprocess("--ds=tpkg.settings_opt", "--dc=MySettings")
99-
result.stdout.fnmatch_lines(["*1 passed*"])
99+
result.stdout.fnmatch_lines(["* 1 passed in*"])
100100
assert result.ret == 0

tests/test_django_settings_module.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def test_ds_after_user_conftest(testdir, monkeypatch):
138138
testdir.makepyfile(settings_after_conftest="SECRET_KEY='secret'")
139139
# testdir.makeconftest("import sys; print(sys.path)")
140140
result = testdir.runpytest_subprocess("-v")
141-
result.stdout.fnmatch_lines(["*1 passed*"])
141+
result.stdout.fnmatch_lines(["* 1 passed in*"])
142142
assert result.ret == 0
143143

144144

@@ -226,7 +226,7 @@ def test_user_count():
226226
"""
227227
)
228228
result = testdir.runpython(p)
229-
result.stdout.fnmatch_lines(["*4 passed*"])
229+
result.stdout.fnmatch_lines(["* 4 passed in*"])
230230

231231

232232
def test_settings_in_hook(testdir, monkeypatch):
@@ -275,7 +275,7 @@ def test_settings():
275275
"""
276276
)
277277
result = testdir.runpytest_subprocess()
278-
result.stdout.fnmatch_lines(["*1 passed*"])
278+
result.stdout.fnmatch_lines(["* 1 passed in*"])
279279
assert result.ret == 0
280280

281281

tests/test_fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ class Migration(migrations.Migration):
602602
)
603603

604604
result = django_testdir.runpytest_subprocess("-s")
605-
result.stdout.fnmatch_lines(["*1 passed*"])
605+
result.stdout.fnmatch_lines(["* 1 passed in*"])
606606
assert result.ret == 0
607607

608608

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*",
57+
"* 1 passed in*",
5858
]
5959
)
6060
assert result.ret == 0

tests/test_unittest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def test_noop(self):
392392

393393
result = django_testdir.runpytest_subprocess("-q", "-s")
394394
result.stdout.fnmatch_lines(
395-
["*FooBarTestCase.setUpClass*", "*test_noop*", "1 passed*"]
395+
["*FooBarTestCase.setUpClass*", "*test_noop*", "1 passed in*"]
396396
)
397397
assert result.ret == 0
398398

0 commit comments

Comments
 (0)