Minimal test for clientStatus consistency

This commit is contained in:
Dmitri Bogomolov 2018-11-01 16:05:37 +02:00
parent 9ef928b4a9
commit ae2cebb2a6
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
1 changed files with 8 additions and 0 deletions

View File

@ -60,6 +60,14 @@ class TestAPI(TestProcessProto):
'API Error 0020: Invalid method: test'
)
def test_clientstatus_consistency(self):
"""If networkStatus is notConnected networkConnections should be 0"""
status = json.loads(self.api.clientStatus())
if status["networkStatus"] == "notConnected":
self.assertEqual(status["networkConnections"], 0)
else:
self.assertGreater(status["networkConnections"], 0)
def test_list_addresses(self):
"""Checking the return of API command 'listAddresses'"""
self.assertEqual(