Example #1
0
    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
Example #2
0
    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
Example #3
0
 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
Example #4
0
 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