parent
783d4dc8ef
commit
16ed125113
11 changed files with 206 additions and 28 deletions
|
@ -3,6 +3,7 @@
|
|||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
import fanstatic
|
||||
from pyramid import testing
|
||||
|
||||
from wuttjamaican.conf import WuttaConfig
|
||||
|
@ -66,6 +67,10 @@ class WebTestCase(DataTestCase):
|
|||
'pyramid.events.BeforeRender')
|
||||
self.pyramid_config.include('wuttaweb.static')
|
||||
|
||||
# nb. mock out fanstatic env..good enough for now to avoid errors..
|
||||
needed = fanstatic.init_needed()
|
||||
self.request.environ[fanstatic.NEEDED] = needed
|
||||
|
||||
# setup new request w/ anonymous user
|
||||
event = MagicMock(request=self.request)
|
||||
subscribers.new_request(event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue