diff options
author | F. Eugene Aumson <feuGeneA@users.noreply.github.com> | 2018-11-14 05:30:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-14 05:30:12 +0800 |
commit | 7b4f63a39ca4b4e05123d2b6871c6e01f8a132a2 (patch) | |
tree | 0ea077c2041a77203f90b4f696edfdff7bc6f943 /python-packages/order_utils/test/test_generate_order_hash_hex.py | |
parent | 5c21d3f6af2ffc513b2bbfe92abf99181a32ceca (diff) | |
download | dexon-sol-tools-7b4f63a39ca4b4e05123d2b6871c6e01f8a132a2.tar dexon-sol-tools-7b4f63a39ca4b4e05123d2b6871c6e01f8a132a2.tar.gz dexon-sol-tools-7b4f63a39ca4b4e05123d2b6871c6e01f8a132a2.tar.bz2 dexon-sol-tools-7b4f63a39ca4b4e05123d2b6871c6e01f8a132a2.tar.lz dexon-sol-tools-7b4f63a39ca4b4e05123d2b6871c6e01f8a132a2.tar.xz dexon-sol-tools-7b4f63a39ca4b4e05123d2b6871c6e01f8a132a2.tar.zst dexon-sol-tools-7b4f63a39ca4b4e05123d2b6871c6e01f8a132a2.zip |
feat(order_utils.py) generate_order_hash_hex() (#1234)
Diffstat (limited to 'python-packages/order_utils/test/test_generate_order_hash_hex.py')
-rw-r--r-- | python-packages/order_utils/test/test_generate_order_hash_hex.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/python-packages/order_utils/test/test_generate_order_hash_hex.py b/python-packages/order_utils/test/test_generate_order_hash_hex.py new file mode 100644 index 000000000..e393f38d7 --- /dev/null +++ b/python-packages/order_utils/test/test_generate_order_hash_hex.py @@ -0,0 +1,18 @@ +"""Test zero_ex.order_utils.get_order_hash_hex().""" + +from zero_ex.order_utils import ( + generate_order_hash_hex, + make_empty_order, + Constants, +) + + +def test_get_order_hash_hex__empty_order(): + """Test the hashing of an uninitialized order.""" + expected_hash_hex = ( + "faa49b35faeb9197e9c3ba7a52075e6dad19739549f153b77dfcf59408a4b422" + ) + actual_hash_hex = generate_order_hash_hex( + make_empty_order(), Constants.null_address + ) + assert actual_hash_hex == expected_hash_hex |