Skip to content

Commit 2b85824

Browse files
committed
better assertions for "is not none"
1 parent 6b4947a commit 2b85824

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/asynchronous/test_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ async def test_error_code(self):
13191319
self.assertIn(exc.code, (9, 10147, 16840, 17009))
13201320
# Just check that we set the error document. Fields
13211321
# vary by MongoDB version.
1322-
self.assertTrue(exc.details is not None)
1322+
self.assertIsNotNone(exc.details)
13231323
else:
13241324
self.fail("OperationFailure was not raised")
13251325

test/test_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ def test_error_code(self):
13051305
self.assertIn(exc.code, (9, 10147, 16840, 17009))
13061306
# Just check that we set the error document. Fields
13071307
# vary by MongoDB version.
1308-
self.assertTrue(exc.details is not None)
1308+
self.assertIsNotNone(exc.details)
13091309
else:
13101310
self.fail("OperationFailure was not raised")
13111311

0 commit comments

Comments
 (0)