From 76a61e234adf3e278c40a632120997015a09e6a3 Mon Sep 17 00:00:00 2001 From: licanwei Date: Tue, 12 Jul 2016 14:12:18 +0800 Subject: [PATCH] Fix unittest in test_api.py tox -e py27 fails with this error: socket.error: [Error 98] Address already in use Change-Id: I1cf4a000fb82228bed6a7da61feed48ab679b891 Closes-Bug: #1599556 --- watcher/tests/cmd/test_api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/watcher/tests/cmd/test_api.py b/watcher/tests/cmd/test_api.py index 8a55deb97..71e90bc01 100644 --- a/watcher/tests/cmd/test_api.py +++ b/watcher/tests/cmd/test_api.py @@ -56,6 +56,7 @@ class TestApi(base.BaseTestCase): api.main() self.assertEqual(1, m_launcher.call_count) + @mock.patch.object(wsgi, "Server", mock.Mock()) @mock.patch("watcher.api.app.pecan.make_app") @mock.patch.object(service, "process_launcher") def test_run_api_app_serve_specific_address(self, m_launcher, m_make_app):