[Checkins] SVN: zopyx.smartprintng.server/branches/security/zopyx/smartprintng/server/tests.py fixes tests
Andreas Jung
andreas at andreas-jung.com
Wed Jul 22 13:18:35 EDT 2009
Log message for revision 102067:
fixes tests
Changed:
U zopyx.smartprintng.server/branches/security/zopyx/smartprintng/server/tests.py
-=-
Modified: zopyx.smartprintng.server/branches/security/zopyx/smartprintng/server/tests.py
===================================================================
--- zopyx.smartprintng.server/branches/security/zopyx/smartprintng/server/tests.py 2009-07-22 17:11:34 UTC (rev 102066)
+++ zopyx.smartprintng.server/branches/security/zopyx/smartprintng/server/tests.py 2009-07-22 17:18:34 UTC (rev 102067)
@@ -14,7 +14,7 @@
between tests (done in setUp for good measure too)
"""
testing.cleanUp()
-
+
def tearDown(self):
""" cleanUp() is required to clear out the application registry
between tests
@@ -27,8 +27,9 @@
request = testing.DummyRequest()
renderer = testing.registerDummyRenderer('templates/index.pt')
response = index(context, request)
- renderer.assert_(project='my_server')
+ renderer.assert_(project='zopyx.smartprintng.server')
+
class ViewIntegrationTests(unittest.TestCase):
""" These tests are integration tests for the view. These test
the functionality the view *and* its integration with the rest of
@@ -58,13 +59,12 @@
testing.cleanUp()
def test_my_view(self):
- from my_server.views import my_view
+ from zopyx.smartprintng.server.views import index
context = testing.DummyModel()
request = testing.DummyRequest()
- result = my_view(context, request)
+ result = index(context, request)
self.assertEqual(result.status, '200 OK')
body = result.app_iter[0]
- self.failUnless('Welcome to' in body)
self.assertEqual(len(result.headerlist), 2)
self.assertEqual(result.headerlist[0],
('Content-Type', 'text/html; charset=UTF-8'))
More information about the Checkins
mailing list