Example #1
0
 def test_get_host_name_returns_na_when_no_host_name_found(self):
     expecte_host_name = 'N/A'
     mock = Mock(spec=Client)
     mock.info.return_value = {}
     wrapper = DockerClientWrapper(mock)
     actual = wrapper.get_host_name()
     self.assertEqual(expecte_host_name, actual)
 def test_get_host_name_returns_na_when_no_host_name_found(self):
     expecte_host_name = 'N/A'
     mock = Mock(spec=Client)
     mock.info.return_value = {}
     wrapper = DockerClientWrapper(mock)
     actual = wrapper.get_host_name()
     self.assertEqual(expecte_host_name, actual)
Example #3
0
 def test_get_host_name_gets_the_client_host_name(self):
     expecte_host_name = 'host'
     mock = Mock(spec=Client)
     mock.info.return_value = {'Name': expecte_host_name}
     wrapper = DockerClientWrapper(mock)
     actual = wrapper.get_host_name()
     self.assertEqual(expecte_host_name, actual)
 def test_get_host_name_gets_the_client_host_name(self):
     expecte_host_name = 'host'
     mock = Mock(spec=Client)
     mock.info.return_value = {'Name': expecte_host_name}
     wrapper = DockerClientWrapper(mock)
     actual = wrapper.get_host_name()
     self.assertEqual(expecte_host_name, actual)