def test_connect_container_to_networks_short_aliase_exists(self):
    service = Service('db', self.mock_client, 'myproject', image='foo', networks={'project_default': {}})
    container = Container(None, {'Id': 'abcdef', 'NetworkSettings': {'Networks': {'project_default': {'Aliases': ['analias', 'abcdef']}}}}, True)
    service.connect_container_to_networks(container)
    assert (not self.mock_client.disconnect_container_from_network.call_count)
    assert (not self.mock_client.connect_container_to_network.call_count)
def test_connect_container_to_networks_short_aliase_exists(self):
    service = Service('db', self.mock_client, 'myproject', image='foo', networks={'project_default': {}})
    container = Container(None, {'Id': 'abcdef', 'NetworkSettings': {'Networks': {'project_default': {'Aliases': ['analias', 'abcdef']}}}}, True)
    service.connect_container_to_networks(container)
    assert (not self.mock_client.disconnect_container_from_network.call_count)
    assert (not self.mock_client.connect_container_to_network.call_count)