tests progress

This commit is contained in:
Denis Zheleztsov 2016-11-14 15:59:39 +03:00
parent 6422a2663c
commit 3f161d14ed

View File

@ -45,5 +45,27 @@ class TestLogger(unittest.TestCase):
self.assertIn('DEBUG', m({'level': 'DEBUG', 'raw': 'log message'}))
class TestMemcachedDiscovery(unittest.TestCase):
def test_discovery_memcache(self):
from surok.system import discovery_memcached
# Load base configurations
surok_conf = '/etc/surok/conf/surok.json'
# Read config file
f = open(surok_conf, 'r')
conf = json.loads(f.read())
f.close()
self.assertEqual(discovery_memcached(conf), [])
class TestGetGroup(unittest.TestCase):
def test_get_group(self):
from surok.discovery import get_group
self.assertFalse(get_group({}, {'env': os.environ}))
if __name__ == '__main__':
unittest.main()