Updated tests with new settings

This commit is contained in:
Manuel Cortez 2019-06-18 16:16:46 -05:00
parent b090d7f896
commit ad5569f26f

View File

@ -5,8 +5,13 @@ import sys
import unittest import unittest
import re import re
import i18n import i18n
import storage
import config
storage.setup()
config.setup()
i18n.setup()
import extractors import extractors
from extractors import baseFile from extractors import base
# Pytohn 2/3 compat # Pytohn 2/3 compat
if sys.version[0] == "2": if sys.version[0] == "2":
@ -30,7 +35,7 @@ class extractorsTestCase(unittest.TestCase):
self.assertIsInstance(len(extractor_instance.results), int) self.assertIsInstance(len(extractor_instance.results), int)
# Take and test validity of the first item. # Take and test validity of the first item.
item = extractor_instance.results[0] item = extractor_instance.results[0]
self.assertIsInstance(item, baseFile.song) self.assertIsInstance(item, base.song)
self.assertIsInstance(item.title, strtype) self.assertIsInstance(item.title, strtype)
self.assertNotEqual(item.title, "") self.assertNotEqual(item.title, "")
if extractor_name == "youtube": # Duration is only available for youtube. if extractor_name == "youtube": # Duration is only available for youtube.