def test_check_purchase(self, opener): opener.return_value.text = good_check_purchase assert paypal.check_purchase('some-paykey') == 'CREATED'
def test_check_purchase_fails(self, opener): opener.return_value.text = other_error assert not paypal.check_purchase('some-paykey')
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'
def test_check_purchase_fails(self, opener): opener.return_value.text = other_error eq_(paypal.check_purchase('some-paykey'), False)
def test_check_purchase(self, opener): opener.return_value.text = good_check_purchase eq_(paypal.check_purchase('some-paykey'), 'CREATED')
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')