Skip to content

Commit

Permalink
Merge pull request #1 from beachmachine/fix_request_for_tests
Browse files Browse the repository at this point in the history
Fix: request/response cycle for tests does not need to be a special case
  • Loading branch information
anx-ckreuzberger authored Nov 16, 2016
2 parents 7486112 + 39c50ba commit ed877ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions django_userforeignkey/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,5 @@ def process_request(self, request):

def process_response(self, request, response):
logger.debug(u"Process response")

# we have to keep the request in memory if we are in test mode, so get_current_user is working
if request.META.get('SERVER_NAME', None) != 'testserver':
set_current_request(None)

set_current_request(None)
return response

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='django-userforeignkey',
version='0.1.1',
version='0.1.2',
packages=find_packages(),
include_package_data=True,
license='BSD License',
Expand Down

0 comments on commit ed877ec

Please sign in to comment.