1 | # This Python file uses the following encoding: utf-8 |
---|
2 | """ |
---|
3 | caching policy manager implementation tests |
---|
4 | |
---|
5 | $Id: test_caching_policy_manager.py 62774 2008-04-16 11:24:20Z wichert $ |
---|
6 | """ |
---|
7 | |
---|
8 | __author__ = 'Héctor Velarde <hvelarde@jornada.com.mx>' |
---|
9 | __docformat__ = 'restructuredtext' |
---|
10 | |
---|
11 | from base import CacheFuTestCase |
---|
12 | |
---|
13 | from Interface.Verify import verifyObject |
---|
14 | from Products.CMFCore.interfaces import ICachingPolicyManager |
---|
15 | |
---|
16 | from Products.CacheSetup.config import * |
---|
17 | from Products.CacheSetup.content.caching_policy_manager import CSCachingPolicyManager |
---|
18 | |
---|
19 | # this thing is pretty obscure to me so tests are incomplete |
---|
20 | |
---|
21 | class TestCachingPolicyManager(CacheFuTestCase): |
---|
22 | |
---|
23 | def afterSetUp(self): |
---|
24 | self.cpm = CSCachingPolicyManager() |
---|
25 | |
---|
26 | def testImplementsCachingPolicyManager(self): |
---|
27 | iface = ICachingPolicyManager |
---|
28 | self.failUnless(iface.isImplementedBy(self.cpm)) |
---|
29 | self.failUnless(verifyObject(iface, self.cpm)) |
---|
30 | |
---|
31 | class TestCachingPolicyManagerMethods(CacheFuTestCase): |
---|
32 | |
---|
33 | def afterSetUp(self): |
---|
34 | self.cpm = CSCachingPolicyManager() |
---|
35 | |
---|
36 | def _test_getHeadersToAddAndRemove(self): |
---|
37 | self.fail('not yet implemented...') |
---|
38 | |
---|
39 | def _test_getHTTPCachingHeaders(self): |
---|
40 | self.fail('not yet implemented...') |
---|
41 | |
---|
42 | def _test_getModTimeAndETag(self): |
---|
43 | self.fail('not yet implemented...') |
---|
44 | |
---|
45 | def _test_getETag(self): |
---|
46 | self.fail('not yet implemented...') |
---|
47 | |
---|
48 | def test_suite(): |
---|
49 | from unittest import TestSuite, makeSuite |
---|
50 | suite = TestSuite() |
---|
51 | suite.addTest(makeSuite(TestCachingPolicyManager)) |
---|
52 | suite.addTest(makeSuite(TestCachingPolicyManagerMethods)) |
---|
53 | return suite |
---|