Line | |
---|
1 | import urllib |
---|
2 | from cStringIO import StringIO |
---|
3 | from base import * |
---|
4 | |
---|
5 | class TestBugs(FunctionalTestCase): |
---|
6 | |
---|
7 | def afterSetUp(self): |
---|
8 | self.basic_auth = ':'.join((portal_owner,default_password)) |
---|
9 | self.loginAsPortalOwner() |
---|
10 | # prepare test document |
---|
11 | my_doc = self.portal.invokeFactory('Document', id='my_doc') |
---|
12 | self.my_doc = self.portal['my_doc'] |
---|
13 | self.abs_path = "/%s" % self.my_doc.absolute_url(1) |
---|
14 | |
---|
15 | def test_modification_date(self): |
---|
16 | """ Modification date changing on SEO properties edit """ |
---|
17 | form_data = {'seo_title': 'New Title', |
---|
18 | 'seo_title_override:int': 1, |
---|
19 | 'form.submitted:int': 1} |
---|
20 | |
---|
21 | md_before = self.my_doc.modification_date |
---|
22 | self.publish(path=self.abs_path+'/@@seo-context-properties', |
---|
23 | basic=self.basic_auth, request_method='POST', |
---|
24 | stdin=StringIO(urllib.urlencode(form_data))) |
---|
25 | md_after = self.my_doc.modification_date |
---|
26 | |
---|
27 | self.assertNotEqual(md_before, md_after) |
---|
28 | |
---|
29 | |
---|
30 | def test_suite(): |
---|
31 | from unittest import TestSuite, makeSuite |
---|
32 | suite = TestSuite() |
---|
33 | suite.addTest(makeSuite(TestBugs)) |
---|
34 | return suite |
---|
Note: See
TracBrowser
for help on using the repository browser.