2
0
Fork 0
wuttaweb/tests/views/test_common.py
Lance Edgar 977c196f47 feat: basic support for WSGI app, views, templates
also docs + tests for what we have so far
2024-07-12 00:17:15 -05:00

28 lines
742 B
Python

# -*- coding: utf-8; -*-
from unittest import TestCase
from pyramid import testing
from wuttjamaican.conf import WuttaConfig
from wuttaweb.views import common
class TestCommonView(TestCase):
def setUp(self):
self.config = WuttaConfig()
self.app = self.config.get_app()
self.request = testing.DummyRequest()
self.request.wutta_config = self.config
self.pyramid_config = testing.setUp(request=self.request)
self.pyramid_config.include('wuttaweb.views.common')
def tearDown(self):
testing.tearDown()
def test_home(self):
view = common.CommonView(self.request)
context = view.home()
self.assertEqual(context['index_title'], self.app.get_title())