made the return url in the tests more complete, and pass through get params to subscription confirm
This commit is contained in:
parent
f993311e7c
commit
977ce8ca8b
|
@ -18,6 +18,7 @@ pipeline:
|
||||||
- python manage.py test mhackspace --verbosity 2
|
- python manage.py test mhackspace --verbosity 2
|
||||||
|
|
||||||
publish-test:
|
publish-test:
|
||||||
|
pull: True
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
host: maidstone-hackspace.org.uk
|
host: maidstone-hackspace.org.uk
|
||||||
user: ${SSH_USERNAME}
|
user: ${SSH_USERNAME}
|
||||||
|
@ -27,6 +28,7 @@ pipeline:
|
||||||
- echo 'to be added'
|
- echo 'to be added'
|
||||||
|
|
||||||
publish-live:
|
publish-live:
|
||||||
|
pull: True
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
user: ${SSH_USERNAME}
|
user: ${SSH_USERNAME}
|
||||||
key: ${SSH_KEY}
|
key: ${SSH_KEY}
|
||||||
|
|
|
@ -37,8 +37,12 @@ class TestSubscriptionSuccessRedirectView(BaseUserTestCase):
|
||||||
}
|
}
|
||||||
|
|
||||||
request = self.factory.post(
|
request = self.factory.post(
|
||||||
reverse('join_hackspace_success', kwargs={'provider': 'gocardless'}),
|
reverse('join_hackspace_success', kwargs={'provider': 'gocardless'}), {
|
||||||
{'signature': 'test_signature'}
|
'resource_id': 'R01',
|
||||||
|
'resource_type': 'subscription',
|
||||||
|
'resource_url': 'https://sandbox.gocardless.com',
|
||||||
|
'signature': 'test_signature'
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
setattr(request, 'session', 'session')
|
setattr(request, 'session', 'session')
|
||||||
|
|
|
@ -82,7 +82,7 @@ class MembershipJoinSuccessView(LoginRequiredMixin, RedirectView):
|
||||||
payment_provider = 'gocardless'
|
payment_provider = 'gocardless'
|
||||||
provider = select_provider(payment_provider)
|
provider = select_provider(payment_provider)
|
||||||
result = provider.confirm_subscription(
|
result = provider.confirm_subscription(
|
||||||
provider_response=kwargs
|
provider_response=self.request.GET
|
||||||
)
|
)
|
||||||
|
|
||||||
#if something went wrong return to profile with an error
|
#if something went wrong return to profile with an error
|
||||||
|
|
Loading…
Reference in New Issue