ad configes files
This commit is contained in:
@@ -1,11 +1,36 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
import unittest
|
||||
import os.path
|
||||
from config.config import Config
|
||||
|
||||
|
||||
class MyTestCase(unittest.TestCase):
|
||||
def test_something(self):
|
||||
self.assertEqual(True, False)
|
||||
class TestConfig(unittest.TestCase):
|
||||
|
||||
def test_key_not_exists(self):
|
||||
value = Config.get("not_existing_config_key")
|
||||
self.assertIsNone(value)
|
||||
|
||||
def test_feed_types(self):
|
||||
types = Config.get("FeedTypes")
|
||||
self.assertIsNotNone(types)
|
||||
self.assertIsInstance(types, set)
|
||||
|
||||
def test_feed_link_types(self):
|
||||
types = Config.get("FeedLinkTypes")
|
||||
self.assertIsNotNone(types)
|
||||
self.assertIsInstance(types, set)
|
||||
|
||||
def test_feed_storage_folder(self):
|
||||
path = Config.get("FeedStorageFolder")
|
||||
self.assertIsNotNone(path)
|
||||
self.assertIsInstance(path, str)
|
||||
self.assertTrue(os.path.isdir(path))
|
||||
|
||||
def test_feed_storage_prefix(self):
|
||||
prefix = Config.get("FeedStoragePrefix")
|
||||
self.assertIsNotNone(prefix)
|
||||
self.assertIsInstance(prefix, dict)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -18,8 +18,6 @@ class TestFeed(unittest.TestCase):
|
||||
def test_setup_feed(self, name, url, feed_type):
|
||||
self.assertTrue(False)
|
||||
|
||||
def test_setup_feed(self, name, url, feed_type):
|
||||
self.assertTrue(False)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user