Skip to content

Commit

Permalink
fix Python format
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinAlbs committed Jul 12, 2024
1 parent 82fc536 commit 2076712
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bindings/python/pymongocrypt/binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,8 @@ def _parse_version(version):
/// String constants for setopt_query_type
// DEPRECATED: Support "rangePreview" has been removed in favor of "range".
/// NOTE: "range" is currently unstable API and subject to backwards breaking changes.
""")
"""
)


def _to_string(cdata):
Expand Down
13 changes: 10 additions & 3 deletions bindings/python/test/test_mongocrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,10 @@ def test_range_query_int32(self):

def test_rangePreview_query_int32(self):
# Expect error attempting to use 'rangePreview'
with self.assertRaisesRegex(MongoCryptError, "Algorithm 'rangePreview' is deprecated, please use 'range'"):
with self.assertRaisesRegex(
MongoCryptError,
"Algorithm 'rangePreview' is deprecated, please use 'range'",
):
key_path = "keys/ABCDEFAB123498761234123456789012-local-document.json"
key_id = json_data(key_path)["_id"]
encrypter = ExplicitEncrypter(
Expand All @@ -1436,8 +1439,12 @@ def test_rangePreview_query_int32(self):
)
self.addCleanup(encrypter.close)

range_opts = bson_data("fle2-find-rangePreview-explicit/int32/rangeopts.json")
value = bson_data("fle2-find-rangePreview-explicit/int32/value-to-encrypt.json")
range_opts = bson_data(
"fle2-find-rangePreview-explicit/int32/rangeopts.json"
)
value = bson_data(
"fle2-find-rangePreview-explicit/int32/value-to-encrypt.json"
)
encrypter.encrypt(
value,
"rangePreview",
Expand Down

0 comments on commit 2076712

Please sign in to comment.