mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Used more specific unittest assertions in tests.
* assertIsNone()/assertIsNotNone() instead of comparing to None. * assertLess() for < comparisons. * assertIs() for 'is' expressions. * assertIsInstance() for isinstance() expressions. * rounding of assertAlmostEqual() for round() expressions. * assertIs(..., True/False) instead of comparing to True/False. * assertIs()/assertIsNot() for ==/!= comparisons. * assertNotEqual() for == comparisons. * assertTrue()/assertFalse() instead of comparing to True/False.
This commit is contained in:
parent
a6cb8ec389
commit
7552de7866
18 changed files with 54 additions and 51 deletions
|
@ -269,7 +269,7 @@ class ImageFieldTwoDimensionsTests(ImageFieldTestMixin, TestCase):
|
|||
|
||||
# Field and dimensions should be cleared after a delete.
|
||||
p.mugshot.delete(save=False)
|
||||
self.assertEqual(p.mugshot, None)
|
||||
self.assertIsNone(p.mugshot.name)
|
||||
self.check_dimensions(p, None, None)
|
||||
|
||||
def test_dimensions(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue