blob: 5adf37221652d8da66ce48fc6178c029907b4dfa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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')
|