summaryrefslogtreecommitdiff
path: root/tests/logging_tests
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/logging_tests
parenta6cb8ec3895a72bfb7f8e62d4b05dd5de6b738af (diff)
downloaddjango-7552de7866dcd270a0f353b007b4aceaa7f3ff3e.tar.gz
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/logging_tests')
-rw-r--r--tests/logging_tests/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/logging_tests/tests.py b/tests/logging_tests/tests.py
index c341e89997..1967ca3687 100644
--- a/tests/logging_tests/tests.py
+++ b/tests/logging_tests/tests.py
@@ -229,8 +229,8 @@ class CallbackFilterTest(SimpleTestCase):
f_false = CallbackFilter(lambda r: False)
f_true = CallbackFilter(lambda r: True)
- self.assertEqual(f_false.filter("record"), False)
- self.assertEqual(f_true.filter("record"), True)
+ self.assertFalse(f_false.filter('record'))
+ self.assertTrue(f_true.filter('record'))
def test_passes_on_record(self):
collector = []