2006-11-02 15:01:09 +01:00
|
|
|
import WebInterfaceTestClass
|
|
|
|
from twill.errors import *
|
|
|
|
|
|
|
|
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
|
|
|
|
|
|
|
|
def test_help_pages(self):
|
|
|
|
'''help pages should be available in different languages'''
|
|
|
|
|
|
|
|
## check english help pages
|
2006-11-06 07:17:22 +01:00
|
|
|
self.cmd.go(self.URL + "help?weblang=en")
|
2006-11-02 15:01:09 +01:00
|
|
|
self.cmd.find("Table of Contents")
|
|
|
|
self.cmd.find("Getting started")
|
|
|
|
|
2006-11-06 07:17:22 +01:00
|
|
|
self.cmd.go(self.URL + "help?weblang=de")
|
2006-11-02 15:01:09 +01:00
|
|
|
self.cmd.find("Table of Contents")
|
|
|
|
self.cmd.find("Wie geht es los")
|
|
|
|
|
2006-11-06 07:17:22 +01:00
|
|
|
self.cmd.go(self.URL + "help?weblang=si")
|
2006-11-02 15:01:09 +01:00
|
|
|
self.assertRaises(TwillAssertionError, self.cmd.notfind, "Table of Contents")
|
|
|
|
#TODO: add a slovene text here, as soon as the help is translated
|
|
|
|
|
2006-11-06 07:17:22 +01:00
|
|
|
self.cmd.go(self.URL + "help?weblang=fr")
|
2006-11-02 15:01:09 +01:00
|
|
|
self.assertRaises(TwillAssertionError, self.cmd.notfind, "Table of Contents")
|
|
|
|
#TODO: add a french text here, as soon as the help is translated
|
|
|
|
|
|
|
|
## test a random language - it should fall back to english
|
2006-11-06 07:17:22 +01:00
|
|
|
self.cmd.go(self.URL + "help?weblang=foobar")
|
2006-11-02 15:01:09 +01:00
|
|
|
self.assertRaises(TwillAssertionError, self.cmd.notfind, "Table of Contents")
|
|
|
|
|