def test_getusage(self): ''' Test if it show current usages statistics. ''' ret = {'message': 'No Random.org api key or api version found.', 'res': False} self.assertDictEqual(random_org.getUsage(), ret) self.assertDictEqual(random_org.getUsage(api_key='peW', api_version='1'), {'bitsLeft': None, 'requestsLeft': None, 'res': True, 'totalBits': None, 'totalRequests': None})
def test_getusage(self): """ Test if it show current usages statistics. """ ret = {"message": "No Random.org api key or api version found.", "res": False} self.assertDictEqual(random_org.getUsage(), ret) self.assertDictEqual( random_org.getUsage(api_key="peW", api_version="1"), { "bitsLeft": None, "requestsLeft": None, "res": True, "totalBits": None, "totalRequests": None, }, )