Skip to content

Commit f67b819

Browse files
committed
DEBUG
1 parent 25e7da1 commit f67b819

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/encryption_/test_base.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,10 @@ def assertEncrypted(self, model, field):
1818
db = new_connection[db_name]
1919
collection = db[model._meta.db_table]
2020
data = collection.find_one({}, {field: 1, "_id": 0})
21-
self.assertIsInstance(data[field], Binary)
21+
try:
22+
self.assertIsInstance(data[field], Binary)
23+
except Exception as e:
24+
raise Exception(
25+
f"collections: {db.list_collection_names()} and "
26+
"collection_count: {collection.count_document()}"
27+
) from e

tests/encryption_/test_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_array(self):
6969
# self.assertIsInstance(data[field], Binary)
7070
# ~~~~^^^^^^^
7171
# TypeError: 'NoneType' object is not subscriptable
72-
# self.assertEncrypted(self.movie, "cast")
72+
self.assertEncrypted(self.movie, "cast")
7373

7474

7575
class FieldTests(EncryptionTestCase):

0 commit comments

Comments
 (0)