moved unittests for (formerly) internal pages to the appropriate plugins

added "do_unittests.sh" - this script should be used to run all unittests before commit
fixed nasty "cannot-switch-languages"-bug
fixed language data loading for plugins
This commit is contained in:
lars 2006-11-02 13:55:31 +00:00
parent e42902f641
commit ada7458306
8 changed files with 91 additions and 34 deletions

View file

@ -21,33 +21,17 @@ class WebServer(WebInterfaceTestClass.WebInterfaceTestClass):
class BuiltinPages(WebInterfaceTestClass.WebInterfaceTestClass):
def test_help_pages(self):
'''help pages should be available in different languages'''
## check english help pages
self.cmd.go(self.URL + "doc?weblang=en")
self.cmd.find("Table of Contents")
self.cmd.find("Getting started")
self.cmd.go(self.URL + "doc?weblang=de")
self.cmd.find("Table of Contents")
self.cmd.find("Wie geht es los")
self.cmd.go(self.URL + "doc?weblang=si")
self.assertRaises(TwillAssertionError, self.cmd.notfind, "Table of Contents")
#TODO: add a slovene text here, as soon as the help is translated
def test_goto_status(self):
'''display all active devices'''
self.cmd.go(self.URL + "status")
self.cmd.find("Status")
def test_goto_system(self):
self.cmd.go(self.URL + "system")
self.cmd.find("System")
def test_goto_index(self):
'''display all devices'''
self.cmd.go(self.URL + "?weblang=en")
self.cmd.find("The CryptoBox")
self.cmd.go(self.URL + "?weblang=de")
self.cmd.find("Die CryptoBox")
self.cmd.go(self.URL + "?weblang=si")
self.cmd.find("Privatnost v vsako vas")
self.cmd.go(self.URL + "?weblang=fr")
self.cmd.find("La CryptoBox")
if __name__ == "__main__":