diff options
author | Caio Carrara <ccarrara@thoughtworks.com> | 2016-05-11 16:24:46 -0300 |
---|---|---|
committer | Caio Carrara <ccarrara@thoughtworks.com> | 2016-05-11 16:24:46 -0300 |
commit | c5f92efdd19464b876e56750f85a6d8ba4d7b558 (patch) | |
tree | 27153897785261460f7bd9fa3a7c588eb1d5137a /service/test/unit/config | |
parent | a23d3bebc0c879682f7d70b2a8451cc98b2d70ab (diff) |
Remove dispatcher references from service
Since we're not using dispatcher anymore, it doesn't make sense to keep
dispatcher references and program flows that depend on it. For example,
it doesn't make sense keep the flag --organization-mode, so it was
removed as well.
Diffstat (limited to 'service/test/unit/config')
-rw-r--r-- | service/test/unit/config/test_credentials.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/service/test/unit/config/test_credentials.py b/service/test/unit/config/test_credentials.py deleted file mode 100644 index 6c25c5bf..00000000 --- a/service/test/unit/config/test_credentials.py +++ /dev/null @@ -1,30 +0,0 @@ -import json -import unittest -import sys -from mockito import mock, when -from pixelated.config import arguments -from pixelated.config import credentials - - -class TestReadCredentials(unittest.TestCase): - - def setUp(self): - self.test_data = {'leap_provider_hostname': 'test_provider', 'user': 'test_user', 'password': 'test_password'} - - def test_organization_mode_reads_credentials_from_stdin(self): - data = json.dumps({'leap_provider_hostname': 'test_provider', 'user': 'test_user', 'password': 'test_password'}) - orig_stdin = sys.stdin - sys.stdin = mock() - when(sys.stdin).read().thenReturn(data) - - try: - sys.argv = ['tmp/does_not_exist', '--organization-mode'] - args = arguments.parse_user_agent_args() - - provider, user, password = credentials.read(args.organization_mode, 'not_used') - - self.assertEquals('test_provider', provider) - self.assertEquals('test_user', user) - self.assertEquals('test_password', password) - finally: - sys.stdin = orig_stdin |