Use request.start and end
authorSverre Rabbelier <srabbelier@gmail.com>
Mon, 14 Sep 2009 18:43:15 +0200
changeset 2915 76b5ef0fb5c6
parent 2914 4f821debda33
child 2916 a7b7e67c0667
Use request.start and end Without the start and end we die on 'assert self.in_request' in the core per request value store methods.
tests/app/soc/views/model/test_base.py
--- a/tests/app/soc/views/model/test_base.py	Mon Sep 14 18:42:52 2009 +0200
+++ b/tests/app/soc/views/model/test_base.py	Mon Sep 14 18:43:15 2009 +0200
@@ -95,8 +95,10 @@
     """
 
     request = MockRequest("/test/public")
+    request.start()
     access_type = "show"
     page_name = "Show Test"
     django_args = {'link_id': 'foo', 'scope_path': 'bar'}
     actual = self.view.public(request, access_type, page_name=page_name, **django_args)
+    request.end()
     self.assertTrue('error' in actual)