def test_parse_file_no_title(self): from gocept.selenium.scripts.converthtmltests import parse_file import gocept.selenium.scripts.tests tests_dir = os.path.dirname(gocept.selenium.scripts.tests.__file__) filename = os.path.join(tests_dir, 'notitle.html') testname, commands, encoding = parse_file(filename) self.assertEqual(None, testname)
def test_parse_file(self): from gocept.selenium.scripts.converthtmltests import parse_file import gocept.selenium.scripts.tests tests_dir = os.path.dirname(gocept.selenium.scripts.tests.__file__) filename = os.path.join(tests_dir, 'plone3login.html') testname, commands, encoding = parse_file(filename) self.assertEqual(encoding, 'utf-8') self.assertEqual(testname, 'plone3login') self.assertEqual(len(commands), 5) self.assertEqual(' selenium.open("/plone/login_form")', commands[0])