Skip to content

Instantly share code, notes, and snippets.

@frankhillard
Created November 25, 2019 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frankhillard/2be0380bebd5fad874dd099309b37691 to your computer and use it in GitHub Desktop.
Save frankhillard/2be0380bebd5fad874dd099309b37691 to your computer and use it in GitHub Desktop.
example of test with pytezos
class CounterContractTest(TestCase):
@classmethod
def setUpClass(cls):
contract_path = join(dirname(dirname(__file__)), "contracts/counter.tz")
cls.contract = ContractInterface.create_from(contract_path)
def test_increaseCounterBy_should_increase_counter_in_storage_by_increase_value(self):
# Given
increase_value = 5
# When
result = self.contract.increaseCounterBy(increase_value).result(storage=0)
# Then
self.assertEqual(result.storage, 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment