mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +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
|
@ -104,7 +104,7 @@ class TestEncodingUtils(SimpleTestCase):
|
|||
class TestRFC3987IEncodingUtils(unittest.TestCase):
|
||||
|
||||
def test_filepath_to_uri(self):
|
||||
self.assertEqual(filepath_to_uri(None), None)
|
||||
self.assertIsNone(filepath_to_uri(None))
|
||||
self.assertEqual(filepath_to_uri('upload\\чубака.mp4'), 'upload/%D1%87%D1%83%D0%B1%D0%B0%D0%BA%D0%B0.mp4')
|
||||
|
||||
def test_iri_to_uri(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue