source: main/kofacustom.nigeria/branches/0.1/src/kofacustom/nigeria/tests/test_foo.py @ 17952

Last change on this file since 17952 was 8852, checked in by uli, 12 years ago

Add basic testing machinery for kofacustom.nigeria. The only contained test can be removed after being studied.

File size: 957 bytes
Line 
1# Make sure that test setup basically works.
2# THIS FILE CAN BE REMOVED.
3
4from kofacustom.nigeria.testing import FunctionalTestCase, FunctionalLayer
5
6class FooTest(FunctionalTestCase):
7
8    layer = FunctionalLayer
9
10    def test_foo(self):
11        # we can access registered components
12        from zope.component import getUtility
13        from waeup.kofa.applicants.interfaces import IApplicantsUtils
14        from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils
15        result = getUtility(IApplicantsUtils)
16        self.assertTrue(isinstance(result, NigeriaApplicantsUtils))
17        return
18
19    def test_bar(self):
20        # we can access browser contents
21        from waeup.kofa.app import University
22        self.getRootFolder()['app'] = University()
23        from zope.testbrowser.testing import Browser
24        br = Browser()
25        br.open('http://localhost/app/')
26        self.assertTrue('WAeUP.Kofa' in br.contents)
27        return
Note: See TracBrowser for help on using the repository browser.