Skip to content

Commit

Permalink
Added automated test for contract trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivek Teega committed Apr 24, 2023
1 parent a35b35d commit e0d013c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ def test_tokenswap_deposits(self):
'stateF': False}
self.assertEqual(result, expected_result)

def test_contract_trigger(self):
text = 'contract@ triggerCondition:"twitter-survives"'
result = parsing.parse_flodata(text, TestParsing.blockinfo_stub, 'testnet')
expected_result = {
'type': 'smartContractPays',
'contractName': 'contract',
'triggerCondition': 'twitter-survives',
'stateF': False}
self.assertEqual(result, expected_result)

if __name__ == '__main__':
unittest.main()

0 comments on commit e0d013c

Please sign in to comment.