Exemple #1
0
 def test_no_service(self):
     bash(self.project, {'SERVICE': 'foo'})
Exemple #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'})
Exemple #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')