diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-11 03:15:07 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-11 03:15:07 +0000 |
| commit | 62bdb6eae8e62e7390f26daa261f75e5cca3b8e7 (patch) | |
| tree | 8ff8bcef0b39dd7e8d89aa3e9c42aac2b1e062cb /tests/regressiontests/requests/tests.py | |
| parent | df8e3e65127252d31417856054d7a2fe3b41fb00 (diff) | |
queryset-refactor: Merged from trunk up to [7216].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7219 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/requests/tests.py')
| -rw-r--r-- | tests/regressiontests/requests/tests.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/regressiontests/requests/tests.py b/tests/regressiontests/requests/tests.py new file mode 100644 index 0000000000..f32ef14ae9 --- /dev/null +++ b/tests/regressiontests/requests/tests.py @@ -0,0 +1,34 @@ +""" +>>> from django.http import HttpRequest +>>> print repr(HttpRequest()) +<HttpRequest +GET:{}, +POST:{}, +COOKIES:{}, +META:{}> + +>>> from django.core.handlers.wsgi import WSGIRequest +>>> print repr(WSGIRequest({'PATH_INFO': 'bogus', 'REQUEST_METHOD': 'bogus'})) +<WSGIRequest +GET:<QueryDict: {}>, +POST:<QueryDict: {}>, +COOKIES:{}, +META:{...}> + +>>> from django.core.handlers.modpython import ModPythonRequest +>>> class FakeModPythonRequest(ModPythonRequest): +... def __init__(self, *args, **kwargs): +... super(FakeModPythonRequest, self).__init__(*args, **kwargs) +... self._get = self._post = self._meta = self._cookies = {} +>>> class Dummy: pass +... +>>> req = Dummy() +>>> req.uri = 'bogus' +>>> print repr(FakeModPythonRequest(req)) +<ModPythonRequest +path:bogus, +GET:{}, +POST:{}, +COOKIES:{}, +META:{}> +""" |
