made the return url in the tests more complete, and pass through get params to subscription confirm

This commit is contained in:
Oliver Marks 2017-02-20 20:16:12 +00:00
parent f993311e7c
commit 977ce8ca8b
3 changed files with 9 additions and 3 deletions

View File

@ -18,6 +18,7 @@ pipeline:
- python manage.py test mhackspace --verbosity 2
publish-test:
pull: True
image: appleboy/drone-ssh
host: maidstone-hackspace.org.uk
user: ${SSH_USERNAME}
@ -27,6 +28,7 @@ pipeline:
- echo 'to be added'
publish-live:
pull: True
image: appleboy/drone-ssh
user: ${SSH_USERNAME}
key: ${SSH_KEY}

View File

@ -37,8 +37,12 @@ class TestSubscriptionSuccessRedirectView(BaseUserTestCase):
}
request = self.factory.post(
reverse('join_hackspace_success', kwargs={'provider': 'gocardless'}),
{'signature': 'test_signature'}
reverse('join_hackspace_success', kwargs={'provider': 'gocardless'}), {
'resource_id': 'R01',
'resource_type': 'subscription',
'resource_url': 'https://sandbox.gocardless.com',
'signature': 'test_signature'
}
)
setattr(request, 'session', 'session')

View File

@ -82,7 +82,7 @@ class MembershipJoinSuccessView(LoginRequiredMixin, RedirectView):
payment_provider = 'gocardless'
provider = select_provider(payment_provider)
result = provider.confirm_subscription(
provider_response=kwargs
provider_response=self.request.GET
)
#if something went wrong return to profile with an error