def test_check_unpaid(self): backend = BitcoinBackend(dict(BITCOIN_VALUE=300, URL='')) backend.make_rpc = FakeBTCRPCUnpaid backend.check(self.p) self.assertEqual(self.p.status, 'new') self.assertEqual(self.p.paid_amount, 0)
def test_check_unpaid(self): backend = BitcoinBackend(dict(URL='')) backend.make_rpc = FakeBTCRPCUnpaid backend.check(self.p) self.assertEqual(self.p.status, 'new') self.assertEqual(self.p.paid_amount, 0)
def test_check_paid(self): backend = BitcoinBackend(dict(BITCOIN_VALUE=300, URL='')) backend.make_rpc = FakeBTCRPCPaid backend.check(self.p) self.assertEqual(self.p.paid_amount, 300) self.assertEqual(self.p.status, 'confirmed')
def test_check_partially_paid(self): backend = BitcoinBackend(dict(URL='')) backend.make_rpc = FakeBTCRPCPartial backend.check(self.p) self.assertEqual(self.p.status, 'new') self.assertEqual(self.p.paid_amount, 150)
def test_check_paid(self): backend = BitcoinBackend(dict(URL='')) backend.make_rpc = FakeBTCRPCPaid backend.check(self.p) self.assertEqual(self.p.paid_amount, 300) self.assertEqual(self.p.status, 'confirmed')