def test_network_mode_service(self):
    container_id = 'bbbb'
    service_name = 'web'
    self.mock_client.containers.return_value = [{'Id': container_id, 'Name': container_id, 'Image': 'abcd'}]
    service = Service(name=service_name, client=self.mock_client)
    network_mode = ServiceNetworkMode(service)
    assert (network_mode.id == service_name)
    assert (network_mode.mode == ('container:' + container_id))
    assert (network_mode.service_name == service_name)
def test_network_mode_service(self):
    container_id = 'bbbb'
    service_name = 'web'
    self.mock_client.containers.return_value = [{'Id': container_id, 'Name': container_id, 'Image': 'abcd'}]
    service = Service(name=service_name, client=self.mock_client)
    network_mode = ServiceNetworkMode(service)
    assert (network_mode.id == service_name)
    assert (network_mode.mode == ('container:' + container_id))
    assert (network_mode.service_name == service_name)