Explorar el Código

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).
Aanand Prasad hace 11 años
padre
commit
3c48884dbb
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 1 1
      requirements.txt
  2. 3 3
      tests/integration/cli_test.py

+ 1 - 1
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

+ 3 - 3
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