Merge pull request #110 from dod-ccpo/mock-eda-client

Create mock eda client
This commit is contained in:
richard-dds
2018-07-31 16:23:22 -04:00
committed by GitHub
2 changed files with 129 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