'Binding information is provided, subnets are on segments'

def test_port_create_with_binding_information(self):

    (network, segments, subnets) = self._create_test_segments_with_subnets(3)
    self._setup_host_mappings([(segments[1]['segment']['id'], 'fakehost'), (segments[1]['segment']['id'], 'otherhost'), (segments[0]['segment']['id'], 'thirdhost')])
    response = self._create_port(self.fmt, net_id=network['network']['id'], tenant_id=network['network']['tenant_id'], arg_list=(portbindings.HOST_ID,), **{portbindings.HOST_ID: 'fakehost'})
    res = self.deserialize(self.fmt, response)
    self._validate_immediate_ip_allocation(res['port']['id'])
    self._assert_one_ip_in_subnet(response, subnets[1]['subnet']['cidr'])
