12345678910111213141516171819202122 |
- #!/usr/bin/env python
- # -*- coding:utf-8 -*-
- import unittest
- import config
- class ConfigTest(unittest.TestCase):
- def test_read_local_config(self):
- path = 'config.json'
- conf = config.Config(path)
- local_config = conf.read_local_config()
- self.assertIsNotNone(local_config)
- self.assertEqual(local_config['redis_host'], 'local.pc')
- self.assertEqual(local_config['redis_port'], ':6370')
- self.assertEqual(local_config['redis_db'], 1)
- self.assertEqual(local_config['redis_password'], 'password')
- def test_read_redis_config(self):
- pass
- if __name__ == '__main__':
- unittest.main()
|