diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-11-10 14:51:43 +0100 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-11-10 14:51:43 +0100 |
commit | e08bfa5ed89aefeb508b1bbae76bbf2a342f85a1 (patch) | |
tree | 8eba47fc7dd95a77f85841d435be38833d300f96 /service/test/unit/config | |
parent | 5c9aa9aff7fed5feddc58845c72607caa7feb76c (diff) |
Pass configured port number to reactor.
Diffstat (limited to 'service/test/unit/config')
-rw-r--r-- | service/test/unit/config/app_factory_test.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/service/test/unit/config/app_factory_test.py b/service/test/unit/config/app_factory_test.py new file mode 100644 index 00000000..5adf3722 --- /dev/null +++ b/service/test/unit/config/app_factory_test.py @@ -0,0 +1,15 @@ +import unittest +from mock import patch, MagicMock, ANY + +from pixelated.config.app_factory import create_app + + +class AppFactoryTest(unittest.TestCase): + + @patch('pixelated.config.app_factory.reactor') + def test_that_create_app_binds_to_port(self, reactor_mock): + app_mock = MagicMock() + + create_app(app_mock, '127.0.0.1', 12345) + + reactor_mock.listenTCP.assert_called_once_with(12345, ANY, interface='127.0.0.1') |