def test_accts_failures(self): self.accts = accounts.create(True, self.url, b'falsekey') hdrs = self.accts.headers() response = self.accts.consume('realtoken', 0.1) assert response.token == 'realtoken' assert response.amount == 0.1 response = self.accts.deposit('realtoken', 0.1) assert response.token == 'realtoken' assert response.amount == 0.1
def test_accts(self): self.accts = accounts.create(True, self.url, b'falsekey') assert self.accts.consume('invalidtoken', 0.1) == None assert self.accts.deposit('invalidtoken', 0.1) == None