Ejemplo n.º 1
0
    def setUp(self):
        super(TestLanguage, self).setUp()

        data = utils.file_loader(os.path.join(self.path, "languages.xml"))
        self.languages = language.LanguageList(xmlhelpers.generate_tree(data))

        self.langs = ('da', 'fi', 'nl', 'de', 'it', 'es', 'fr', 'pl', 'hu',
                      'el', 'tr', 'ru', 'he', 'ja', 'pt', 'zh', 'cs', 'sl',
                      'hr', 'ko', 'en', 'sv', 'no')
Ejemplo n.º 2
0
    def test_load(self):
        """The Loader should successfully load the provided url"""

        mirror_file = resource_filename(__name__, 'data/mirrors.xml')
        data = utils.file_loader(mirror_file)

        url = ("http://www.thetvdb.com/api/%(api_key)s/mirrors.xml" %
              self.context)
        result = self.loader.load(url)

        #Fix any new line issues to assure it does not affect the test
        data = data.replace('\r\n', '\n')
        result = result.replace('\r\n', '\n')

        self.assertEqual(data, result)
Ejemplo n.º 3
0
    def test_load(self):
        """The Loader should successfully load the provided url"""

        mirror_file = resource_filename(__name__, 'data/mirrors.xml')
        data = utils.file_loader(mirror_file)

        url = ("http://www.thetvdb.com/api/%(api_key)s/mirrors.xml" %
               self.context)
        result = self.loader.load(url)

        #Fix any new line issues to assure it does not affect the test
        data = data.replace('\r\n', '\n')
        result = result.replace('\r\n', '\n')

        self.assertEqual(data, result)
Ejemplo n.º 4
0
    def setUp(self):
        super(TestMirror, self).setUp()

        data = utils.file_loader(os.path.join(self.path, "mirrors.xml"))
        self.mirrors = mirror.MirrorList(xmlhelpers.generate_tree(data))
Ejemplo n.º 5
0
    def setUp(self):
        super(TestMirror, self).setUp()

        data = utils.file_loader(os.path.join(self.path, "mirrors.xml"))
        self.mirrors = mirror.MirrorList(xmlhelpers.generate_tree(data))