From 3c48884dbb237bfc92eef7e54b256cd730c833b6 Mon Sep 17 00:00:00 2001 From: Aanand Prasad Date: Fri, 27 Jun 2014 14:41:36 +0100 Subject: [PATCH] Update dockerpty; stub it out in tests Its current behaviour occasionally causes tests to hang; until this is resolved, we'll stub it out. We weren't testing the output of 'run' anyhow (though we should be). --- requirements.txt | 2 +- tests/integration/cli_test.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index ae8a8b7d..06c6be5b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,4 @@ PyYAML==3.10 requests==2.2.1 texttable==0.8.1 websocket-client==0.11.0 -dockerpty==0.1.0 +dockerpty==0.1.1 diff --git a/tests/integration/cli_test.py b/tests/integration/cli_test.py index 87c9680b..2660ca00 100644 --- a/tests/integration/cli_test.py +++ b/tests/integration/cli_test.py @@ -102,7 +102,7 @@ class CLITestCase(DockerClientTestCase): self.assertEqual(old_ids, new_ids) - @patch('sys.stdout', new_callable=StringIO) + @patch('dockerpty.start') def test_run_with_links(self, mock_stdout): mock_stdout.fileno = lambda: 1 @@ -113,7 +113,7 @@ class CLITestCase(DockerClientTestCase): self.assertEqual(len(db.containers()), 1) self.assertEqual(len(console.containers()), 0) - @patch('sys.stdout', new_callable=StringIO) + @patch('dockerpty.start') def test_run_with_no_deps(self, mock_stdout): mock_stdout.fileno = lambda: 1 @@ -122,7 +122,7 @@ class CLITestCase(DockerClientTestCase): db = self.command.project.get_service('db') self.assertEqual(len(db.containers()), 0) - @patch('sys.stdout', new_callable=StringIO) + @patch('dockerpty.start') def test_run_does_not_recreate_linked_containers(self, mock_stdout): mock_stdout.fileno = lambda: 1