Exemplo n.º 1
0
 def test_no_service(self):
     bash(self.project, {'SERVICE': 'foo'})
Exemplo n.º 2
0
 def test_no_container(self):
     mock_client = mock.create_autospec(docker.Client)
     mock_client.containers.return_value = self.mock_container('nope_1')
     self.project = Project.from_dicts('test', project, mock_client)
     bash(self.project, {'SERVICE': 'web'})
Exemplo n.º 3
0
 def test_bash(self):
     with mock.patch('os.system') as call:
         bash(self.project, {'SERVICE': 'web'})
     call.assert_called_with('docker exec -t -i test_web_1 /bin/bash')