diff options
| author | Tim Graham <timograham@gmail.com> | 2013-10-10 09:35:56 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-10-10 09:35:56 -0400 |
| commit | cec11a3336c730e6dc2f1966fee749cc830e97c0 (patch) | |
| tree | 014c34809c0d39ca63c711e6168d297b9de013b3 /tests/basic/tests.py | |
| parent | ff9e8eccf89fc1dce441736c39dcb6e218ca8940 (diff) | |
Used "is" for comparisons with None.
Diffstat (limited to 'tests/basic/tests.py')
| -rw-r--r-- | tests/basic/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/basic/tests.py b/tests/basic/tests.py index 0d766dde2b..5c1ed0726a 100644 --- a/tests/basic/tests.py +++ b/tests/basic/tests.py @@ -33,7 +33,7 @@ class ModelTest(TestCase): a.save() # Now it has an ID. - self.assertTrue(a.id != None) + self.assertTrue(a.id is not None) # Models have a pk property that is an alias for the primary key # attribute (by default, the 'id' attribute). @@ -585,7 +585,7 @@ class ModelTest(TestCase): f3 = Field() self.assertTrue(f2 < f1) self.assertTrue(f3 > f1) - self.assertFalse(f1 == None) + self.assertFalse(f1 is None) self.assertFalse(f2 in (None, 1, '')) def test_extra_method_select_argument_with_dashes_and_values(self): |
