1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Used more specific unittest assertions in tests.

This commit is contained in:
Mads Jensen
2021-04-16 23:19:25 +02:00
committed by Mariusz Felisiak
parent 7309393c3a
commit c51bf80d56
5 changed files with 8 additions and 8 deletions

View File

@@ -405,7 +405,7 @@ class DiscoverRunnerTests(SimpleTestCase):
with runner.time_keeper.timed('test'):
pass
runner.time_keeper.print_results()
self.assertTrue(isinstance(runner.time_keeper, NullTimeKeeper))
self.assertIsInstance(runner.time_keeper, NullTimeKeeper)
self.assertNotIn('test', stderr.getvalue())
def test_timings_captured(self):
@@ -414,7 +414,7 @@ class DiscoverRunnerTests(SimpleTestCase):
with runner.time_keeper.timed('test'):
pass
runner.time_keeper.print_results()
self.assertTrue(isinstance(runner.time_keeper, TimeKeeper))
self.assertIsInstance(runner.time_keeper, TimeKeeper)
self.assertIn('test', stderr.getvalue())
def test_log(self):