Create mock eda client

This commit is contained in:
richard-dds
2018-07-24 16:48:15 -04:00
parent b5c1745266
commit bf279b7eee
2 changed files with 373 additions and 0 deletions

17
tests/test_eda_client.py Normal file
View File

@@ -0,0 +1,17 @@
from atst.eda_client import MockEDAClient
client = MockEDAClient()
def test_list_contracts():
results = client.list_contracts()
assert len(results) == 3
def test_get_contract():
result = client.get_contract("DCA10096D0052", "y")
assert result["contract_no"] == "DCA10096D0052"
assert result["amount"] == 2000000
def test_contract_not_found():
result = client.get_contract("abc", "y")
assert result is None