Skip to content

Commit fc758b3

Browse files
committed
fix lint, add test for escape_string
1 parent 35327ed commit fc758b3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

convex_api/contract.py

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
66
"""
77

8+
import re
9+
810
from convex_api.utils import to_address
911

1012

tests/intergration/test_contract.py

+5
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ def test_convex_api_deploy_contract(convex_url, test_account):
4848
contract = convex.load_contract(TEST_CONTRACT_NAME)
4949
assert(contract)
5050
assert(contract_address == contract.address)
51+
52+
53+
def test_convex_api_contract_escape_string():
54+
test_text = 'this is a test "string" '
55+
assert('this is a test \\"string\\" ' == Contract.escape_string(test_text))

0 commit comments

Comments
 (0)