Пример #1
0
 def test_check_purchase(self, opener):
     opener.return_value.text = good_check_purchase
     assert paypal.check_purchase('some-paykey') == 'CREATED'
Пример #2
0
 def test_check_purchase_fails(self, opener):
     opener.return_value.text = other_error
     assert not paypal.check_purchase('some-paykey')
Пример #3
0
 def _test_check_purchase_no_mock(self):
     # Remove _ and run if you'd like to try this unmocked.
     key = paypal.get_paykey(self.data)
     assert paypal.check_purchase(key) == 'CREATED'
Пример #4
0
 def test_check_purchase_fails(self, opener):
     opener.return_value.text = other_error
     eq_(paypal.check_purchase('some-paykey'), False)
Пример #5
0
 def test_check_purchase(self, opener):
     opener.return_value.text = good_check_purchase
     eq_(paypal.check_purchase('some-paykey'), 'CREATED')
Пример #6
0
 def _test_check_purchase_no_mock(self):
     # Remove _ and run if you'd like to try this unmocked.
     key = paypal.get_paykey(self.data)
     eq_(paypal.check_purchase(key), 'CREATED')
Пример #7
0
 def test_check_purchase_fails(self, opener):
     opener.return_value.text = other_error
     assert not paypal.check_purchase('some-paykey')