diff options
author | Bruno Wagner <bwgpro@gmail.com> | 2015-06-03 11:59:40 -0300 |
---|---|---|
committer | Bruno Wagner <bwgpro@gmail.com> | 2015-06-03 11:59:40 -0300 |
commit | 2dfae135cc1ecc94b9adde99168deaf1c1de6f3a (patch) | |
tree | 4d15bf69ca91943a8ee3cf46c8dc1f179a1820eb /service/test/unit | |
parent | 5058713490ad0f74c177b883b84af9bacdf6eaf1 (diff) |
Fixed tests after app changes
Diffstat (limited to 'service/test/unit')
-rw-r--r-- | service/test/unit/config/test_dispatcher.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/service/test/unit/config/test_dispatcher.py b/service/test/unit/config/test_dispatcher.py index ad85a63c..8bb4bbc4 100644 --- a/service/test/unit/config/test_dispatcher.py +++ b/service/test/unit/config/test_dispatcher.py @@ -4,7 +4,7 @@ import thread import sys from mockito import mock, when import os -from pixelated.config import App +from pixelated.config.config import Config from pixelated.config.args import parse as parse_args from pixelated.config.dispatcher import config_dispatcher @@ -13,7 +13,7 @@ from pixelated.config.dispatcher import config_dispatcher class TestConfigDispatcher(unittest.TestCase): def setUp(self): - self.app = App() + self.config = Config() self.test_data = {'leap_provider_hostname': 'test_provider', 'user': 'test_user', 'password': 'test_password'} def test_that_organization_switch_reads_the_credentials_from_pipe(self): @@ -24,11 +24,11 @@ class TestConfigDispatcher(unittest.TestCase): self._mkfifo(fifo_path) - config_dispatcher(self.app, args) + provider, user, password = config_dispatcher(args.dispatcher) - self.assertEquals('test_provider', self.app['LEAP_SERVER_NAME']) - self.assertEquals('test_user', self.app['LEAP_USERNAME']) - self.assertEquals('test_password', self.app['LEAP_PASSWORD']) + self.assertEquals('test_provider', provider) + self.assertEquals('test_user', user) + self.assertEquals('test_password', password) def test_that_organization_switch_reads_the_credentials_from_stdin(self): data = json.dumps({'leap_provider_hostname': 'test_provider', 'user': 'test_user', 'password': 'test_password'}) @@ -40,11 +40,11 @@ class TestConfigDispatcher(unittest.TestCase): sys.argv = ['tmp/does_not_exist', '--dispatcher-stdin'] args = parse_args() - config_dispatcher(self.app, args) + provider, user, password = config_dispatcher(args.dispatcher) - self.assertEquals('test_provider', self.app['LEAP_SERVER_NAME']) - self.assertEquals('test_user', self.app['LEAP_USERNAME']) - self.assertEquals('test_password', self.app['LEAP_PASSWORD']) + self.assertEquals('test_provider', provider) + self.assertEquals('test_user', user) + self.assertEquals('test_password', password) finally: sys.stdin = orig_stdin |