Skip to content

Commit

Permalink
Merge pull request #17 from epicserve/fix_url_follow
Browse files Browse the repository at this point in the history
Fixed the follow keyword argument being before *args.
  • Loading branch information
frankwiles committed Aug 12, 2015
2 parents a50f514 + 0add45a commit e1eb324
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test_plus/test.py
Expand Up @@ -105,12 +105,13 @@ def __init__(self, *args, **kwargs):
def tearDown(self):
self.client.logout()

def get(self, url_name, follow=False, *args, **kwargs):
def get(self, url_name, *args, **kwargs):
"""
GET url by name using reverse()
If reverse raises NoReverseMatch attempt to use it as a URL.
"""
follow = kwargs.pop("follow", False)
extra = kwargs.pop("extra", {})
data = kwargs.pop("data", {})
try:
Expand All @@ -121,12 +122,13 @@ def get(self, url_name, follow=False, *args, **kwargs):
self.context = self.last_response.context
return self.last_response

def post(self, url_name, follow=False, *args, **kwargs):
def post(self, url_name, *args, **kwargs):
"""
POST to url by name using reverse()
If reverse raises NoReverseMatch attempt to use it as a URL.
"""
follow = kwargs.pop("follow", False)
data = kwargs.pop("data", None)
extra = kwargs.pop("extra", {})
try:
Expand Down

0 comments on commit e1eb324

Please sign in to comment.