Skip to content

Commit

Permalink
add test_call_protection_field_fails test
Browse files Browse the repository at this point in the history
  • Loading branch information
rimrakhimov committed Sep 4, 2024
1 parent 08861ae commit 53f2f10
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_constraint_creation_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ def test_immutables_field_fails(self, connection, dummy_code, dummy_contract, du
connection, dummy_contract_deployment.id, dummy_compiled_contract.id),
"creation_values_object")

def test_call_protection_field_fails(self, connection, dummy_code, dummy_contract, dummy_contract_deployment, dummy_compiled_contract, dummy_verified_contract):
dummy_verified_contract.creation_values["callProtection"] = "0x4000000000000000000000000000000000000000"
check_constraint_fails(
lambda: dummy_verified_contract.insert(
connection, dummy_contract_deployment.id, dummy_compiled_contract.id),
"creation_values_object")

def test_unknown_field_fails(self, connection, dummy_code, dummy_contract, dummy_contract_deployment, dummy_compiled_contract, dummy_verified_contract):
dummy_verified_contract.creation_values['unknown_key'] = dict({})
check_constraint_fails(
Expand Down

0 comments on commit 53f2f10

Please sign in to comment.