[testlib] added some new required attributes on FakeRequest, fix dummy NameError
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 23 Sep 2009 19:42:44 +0200
changeset 3454 ad1cddc06997
parent 3453 e2572c9ca3ec
child 3455 a0a252643227
[testlib] added some new required attributes on FakeRequest, fix dummy NameError
devtools/fake.py
devtools/testlib.py
--- a/devtools/fake.py	Wed Sep 23 19:41:19 2009 +0200
+++ b/devtools/fake.py	Wed Sep 23 19:42:44 2009 +0200
@@ -47,6 +47,8 @@
         super(FakeRequest, self).__init__(*args, **kwargs)
         self._session_data = {}
         self._headers = {}
+        self.config = self.vreg.config
+        self.schema = self.vreg.schema
 
     def header_accept_language(self):
         """returns an ordered list of preferred languages"""
--- a/devtools/testlib.py	Wed Sep 23 19:41:19 2009 +0200
+++ b/devtools/testlib.py	Wed Sep 23 19:42:44 2009 +0200
@@ -438,7 +438,7 @@
                 continue
             views = [view for view in views
                      if view.category != 'startupview'
-                     and not issubclass(view, NotificationView)]
+                     and not issubclass(view, notification.NotificationView)]
             if views:
                 try:
                     view = viewsvreg._select_best(views, req, rset=rset)