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

Commit

Permalink
Bug 1065624: Fix tests. Add support for py.test.
Browse files Browse the repository at this point in the history
Remove nose et. al.
  • Loading branch information
pmac committed Aug 12, 2015
1 parent 88d2565 commit 0fe3129
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions news/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,8 @@ def list_newsletters(request):
def update_user_task(request, api_call_type, data=None, optin=True, sync=False):
"""Call the update_user task async with the right parameters.
If sync==True, be sure to do the update synchronously and include the token
in the response. Otherwise, basket has the option to do it all later
in the background.
If sync==True, be sure to include the token in the response.
Otherwise, basket can just do everything in the background.
"""
data = data or request.POST.dict()

Expand Down Expand Up @@ -623,9 +622,6 @@ def update_user_task(request, api_call_type, data=None, optin=True, sync=False):
}, 400)

if sync:
# We need a token for this user. If we don't have a Subscriber
# object for them already, we'll need to find or make one,
# checking ET first if need be.
try:
user_data, created = get_or_create_user_data(email=email, token=token)
except NewsletterException as e:
Expand Down

0 comments on commit 0fe3129

Please sign in to comment.