Skip to content
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.

Commit

Permalink
Remove assertRedirects for reals this time
Browse files Browse the repository at this point in the history
  • Loading branch information
kumar303 committed Dec 13, 2012
1 parent 4acdee1 commit 1a32ce7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webpay/pin/tests/test_views.py
Expand Up @@ -31,7 +31,7 @@ def test_buyer_does_not_exist(self, change_pin, create_buyer):
res = self.client.post(self.url, data={'pin': '1234'})
assert create_buyer.called
assert not change_pin.called
self.assertRedirects(res, reverse('pin.confirm'))
assert res['Location'].endswith(reverse('pin.confirm'))

@patch('lib.solitude.api.client.create_buyer', auto_spec=True)
@patch('lib.solitude.api.client.change_pin', auto_spec=True)
Expand All @@ -40,7 +40,7 @@ def test_buyer_does_exist_with_no_pin(self, change_pin, create_buyer):
res = self.client.post(self.url, data={'pin': '1234'})
assert not create_buyer.called
assert change_pin.called
self.assertRedirects(res, reverse('pin.confirm'))
assert res['Location'].endswith(reverse('pin.confirm'))

@patch('lib.solitude.api.client.create_buyer', auto_spec=True)
@patch('lib.solitude.api.client.change_pin', auto_spec=True)
Expand Down Expand Up @@ -112,7 +112,7 @@ def test_unauth(self):
@patch.object(client, 'confirm_pin', lambda x, y: True)
def test_good_pin(self):
res = self.client.post(self.url, data={'pin': '1234'})
self.assertRedirects(res, get_payment_url())
assert res['Location'].endswith(get_payment_url())

@patch.object(client, 'confirm_pin', lambda x, y: False)
def test_bad_pin(self):
Expand Down

0 comments on commit 1a32ce7

Please sign in to comment.