sampleapp/sampleapp/tests.py
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Tue, 08 Mar 2016 16:12:01 +0100
changeset 11608 259fa3391c7b
parent 11483 7b7ed56bf2fb
permissions -rw-r--r--
keep track of all traceback in error handling, not just the exception message (closes #11689093)

import unittest

from pyramid import testing


class ViewTests(unittest.TestCase):
    def setUp(self):
        self.config = testing.setUp()

    def tearDown(self):
        testing.tearDown()

    def test_my_view(self):
        from .views import my_view
        request = testing.DummyRequest()
        info = my_view(request)
        self.assertEqual(info['project'], 'cubi')