Skip to content
Browse files

MockHttpRequest isnt entirely useful as a mock object, so drop suppor…

…t for it
  • Loading branch information...
1 parent 59528f9 commit 3f93d39927b631e166190a8e9761ea99f4077176 @dcramer committed Apr 9, 2012
Showing with 5 additions and 2 deletions.
  1. +4 −1 mock_django/http.py
  2. +1 −1 setup.py
View
5 mock_django/http.py
@@ -21,6 +21,9 @@ def __init__(self, *args, **kwargs):
self.user = AnonymousUser()
self.session = {}
self.url = '/'
+ self.META = {}
+ self.GET = {}
+ self.POST = {}
def _get_request(self):
if not hasattr(self, '_request'):
@@ -55,7 +58,7 @@ def MockHttpRequest(url='/', method='GET', GET=None, POST=None, META=None):
'HTTP_REFERER': '',
}
- request = Mock(spec=WsgiHttpRequest())
+ request = WsgiHttpRequest()
request.url = url
request.method = method
request.META = META
View
2 setup.py
@@ -2,7 +2,7 @@
setup(
name='mock-django',
- version='0.5.0',
+ version='0.6.0',
description='',
license='Apache License 2.0',
author='David Cramer',

0 comments on commit 3f93d39

Please sign in to comment.
Something went wrong with that request. Please try again.