summaryrefslogtreecommitdiff
path: root/service/test
diff options
context:
space:
mode:
authorBruno Wagner <bwagner@thoughtworks.com>2014-10-22 18:26:25 +0200
committerBruno Wagner <bwagner@thoughtworks.com>2014-10-22 18:28:23 +0200
commita2e4f6e4816d4f0d92888b577b76153cf8c65e19 (patch)
tree779ba7e2f39d83616c2b7835e7e2a5a0c469ca60 /service/test
parenta69591d9c8a166a1b6cb1ee19dd1f8bae0c810c5 (diff)
Host and port are now user agent switches, not depending on .pixelated file anymore
Diffstat (limited to 'service/test')
-rw-r--r--service/test/unit/runserver_test.py18
1 files changed, 2 insertions, 16 deletions
diff --git a/service/test/unit/runserver_test.py b/service/test/unit/runserver_test.py
index 1e735bf7..18621ce7 100644
--- a/service/test/unit/runserver_test.py
+++ b/service/test/unit/runserver_test.py
@@ -28,28 +28,14 @@ import pixelated.config.app_factory as app_factory
class RunserverTest(unittest.TestCase):
- def test_that_default_config_file_is_home_dot_pixelated(self):
- orig_config = pixelated.runserver.app.config
- try:
- when(crochet).setup().thenReturn(None)
- when(reactor_manager).start_reactor().thenReturn(None)
- when(app_factory).create_app().thenReturn(None)
- pixelated.runserver.app.config = mock()
-
- sys.argv = ['/tmp/does_not_exist']
- pixelated.runserver.setup()
-
- verify(pixelated.runserver.app.config).from_pyfile(os.path.join(os.environ['HOME'], '.pixelated'))
- finally:
- pixelated.runserver.app.config = orig_config
-
def test_that_config_file_can_be_specified_on_command_line(self):
orig_config = pixelated.runserver.app.config
try:
when(crochet).setup().thenReturn(None)
when(reactor_manager).start_reactor().thenReturn(None)
when(app_factory).create_app().thenReturn(None)
- pixelated.runserver.app.config = mock()
+ pixelated.runserver.app.config = mock(dict)
+ pixelated.runserver.app.config.__setitem__ = mock()
sys.argv = ['/tmp/does_not_exist', '--config', '/tmp/some/config/file']
pixelated.runserver.setup()