~ubuntu-branches/ubuntu/precise/trac/precise

« back to all changes in this revision

Viewing changes to trac/wiki/tests/functional.py

  • Committer: Bazaar Package Importer
  • Author(s): Luis Matos
  • Date: 2008-07-13 23:46:20 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20080713234620-13ynpdpkbaymfg1z
Tags: 0.11-2
* Re-added python-setup-tools to build dependences. Closes: #490320 #468705
* New upstream release Closes: 489727
* Added sugestion for other vcs support available: git bazaar mercurial 
* Added spamfilter plugin to sugests
* Moved packaging from python-support to python-central
* Added an entry to the NEWS about the cgi Closes: #490275
* Updated 10_remove_trac_suffix_from_title patch to be used in 0.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
from trac.tests.functional import *
 
3
 
 
4
 
 
5
class TestWiki(FunctionalTwillTestCaseSetup):
 
6
    def runTest(self):
 
7
        """Create a wiki page and attach a file"""
 
8
        # TODO: this should be split into multiple tests
 
9
        pagename = random_unique_camel()
 
10
        self._tester.create_wiki_page(pagename)
 
11
        self._tester.attach_file_to_wiki(pagename)
 
12
 
 
13
 
 
14
class RegressionTestTicket4812(FunctionalTwillTestCaseSetup):
 
15
    def runTest(self):
 
16
        """Test for regression of http://trac.edgewall.org/ticket/4812"""
 
17
        pagename = random_unique_camel() + '/' + random_unique_camel()
 
18
        self._tester.create_wiki_page(pagename)
 
19
        self._tester.attach_file_to_wiki(pagename)
 
20
        tc.notfind('does not exist')
 
21
 
 
22
 
 
23
def functionalSuite(suite=None):
 
24
    if not suite:
 
25
        import trac.tests.functional.testcases
 
26
        suite = trac.tests.functional.testcases.functionalSuite()
 
27
    suite.addTest(TestWiki())
 
28
    suite.addTest(RegressionTestTicket4812())
 
29
    return suite
 
30
 
 
31
 
 
32
if __name__ == '__main__':
 
33
    unittest.main(defaultTest='functionalSuite')