diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-11-06 16:46:38 +0100 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-11-06 16:46:38 +0100 |
commit | 46692d1994ab83a0def7bd24f02efa0eaa130871 (patch) | |
tree | 3a871bce56bf400fbdd65a3b85f0175bfc557981 /service/test | |
parent | 73f931813b54bafa9c70d88068c13dfcb804288b (diff) |
Issue #100: Read credentials from pipe.
Diffstat (limited to 'service/test')
-rw-r--r-- | service/test/unit/runserver_test.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/service/test/unit/runserver_test.py b/service/test/unit/runserver_test.py index 4a9bca6f..e3cd8439 100644 --- a/service/test/unit/runserver_test.py +++ b/service/test/unit/runserver_test.py @@ -18,6 +18,7 @@ import unittest import sys import os import thread +import json import pixelated.runserver from mockito import * @@ -51,12 +52,9 @@ class RunserverTest(unittest.TestCase): os.remove(fifo_path) test_fifo = os.mkfifo('/tmp/credentials-pipe') thread.start_new_thread(self.spin_up_fifo, (fifo_path,)) - sys.argv = ['tmp/does_not_exist', '--dispatcher'] - pixelated.runserver.credentials_pipe = fifo_path + sys.argv = ['tmp/does_not_exist', '--dispatcher', fifo_path] pixelated.runserver.setup() def spin_up_fifo(self, test_fifo): with open(test_fifo, 'w') as fifo: - fifo.write('test_provider') - fifo.write('test_user') - fifo.write('test_password') + fifo.write(json.dumps({'leap_provider_hostname': 'test_provider', 'user': 'test_user', 'password': 'test_password'})) |