Skip to content

Commit b2a0534

Browse files
committed
Add setup & teardown for QE features test
1 parent 071192e commit b2a0534

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/backend_/test_features.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,13 @@ def mocked_command(command):
4747

4848

4949
class SupportsQueryableEncryptionTests(TestCase):
50-
# TODO: Add setUp? `del connection.features.supports_queryable_encryption` returns
51-
# `AttributeError: 'DatabasesFeatures' object has no attribute 'supports_queryable_encryption'`
52-
# even though it does have it upon inspection in `pdb`.
50+
def setUp(self):
51+
# Clear the cached property.
52+
connection.features.__dict__.pop("supports_queryable_encryption", None)
53+
54+
def tearDown(self):
55+
connection.features.__dict__.pop("supports_queryable_encryption", None)
56+
5357
def test_supports_queryable_encryption(self):
5458
def mocked_command(command):
5559
if command == "buildInfo":

0 commit comments

Comments
 (0)