summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_encoding.py
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2019-10-21 09:55:05 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-10-29 12:37:30 +0100
commit7552de7866dcd270a0f353b007b4aceaa7f3ff3e (patch)
tree2e84292833853d9659671ed304cb32d5acef5f90 /tests/utils_tests/test_encoding.py
parenta6cb8ec3895a72bfb7f8e62d4b05dd5de6b738af (diff)
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.
Diffstat (limited to 'tests/utils_tests/test_encoding.py')
-rw-r--r--tests/utils_tests/test_encoding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/utils_tests/test_encoding.py b/tests/utils_tests/test_encoding.py
index 032124b59a..b878988e11 100644
--- a/tests/utils_tests/test_encoding.py
+++ b/tests/utils_tests/test_encoding.py
@@ -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):