Fix tests

This commit is contained in:
12v
2023-09-10 14:51:40 +01:00
parent 4115f9b5c3
commit 107e58d84c

View File

@@ -47,17 +47,7 @@ def test_file_init_without_auth():
with open('./assets/networks/domain_corp_network.json') as f:
network_json = json.load(f)
for key in network.__dict__.keys():
if key != 'hop' and key != '_file':
assert network.__dict__[key] == network_json[key]
# test 5: network initialised with 'file' arg without auth loads network:
def test_file_init_without_auth():
network = sugartrail.base.Network(file ='./assets/networks/domain_corp_network.json')
with open('./assets/networks/domain_corp_network.json') as f:
network_json = json.load(f)
for key in network.__dict__.keys():
if key != 'hop' and key != '_file':
if key not in ['hop', '_file', 'progress']:
assert network.__dict__[key] == network_json[key]
# test 5: network loads network from file without auth:
@@ -68,5 +58,5 @@ def test_file_load_without_auth():
with open('./assets/networks/domain_corp_network.json') as f:
network_json = json.load(f)
for key in network.__dict__.keys():
if key != 'hop' and key != '_file':
if key not in ['hop', '_file', 'progress']:
assert network.__dict__[key] == network_json[key]