forked from murbard/pytezos
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix lazy_storage_diff issue | Ithaca endpoints (#289)
* Fix lazy_storage_diff issue | Ithaca endpoints * Fixup
- Loading branch information
Showing
9 changed files
with
47 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from pytezos.sandbox.node import SandboxedNodeTestCase | ||
from pytezos import ContractInterface | ||
|
||
code = """ | ||
{ parameter string ; | ||
storage (big_map string nat) ; | ||
code { UNPAIR ; | ||
SWAP ; | ||
PUSH nat 1 ; | ||
SOME ; | ||
DIG 2 ; | ||
UPDATE ; | ||
NIL operation ; | ||
PAIR } } | ||
""" | ||
|
||
|
||
class TestRunCode(SandboxedNodeTestCase): | ||
|
||
def test_lazy_storage_diff(self): | ||
contract = ContractInterface.from_michelson(code).using(shell=self.client.shell) | ||
res = contract.using('mainnet').default('hello').run_code() | ||
self.assertEqual({'hello': 1}, res.storage) | ||
res1 = contract.default('hello').interpret() | ||
self.assertEqual({'hello': 1}, res1.storage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters