'A request with an invalid (non-IPv4) primary IP address is rejected
with ``BAD_REQUEST``.'

def test_primary_invalid(self):

    expected_manifestation = _manifestation()
    node_a = Node(uuid=self.NODE_A_UUID, applications={}, manifestations={expected_manifestation.dataset_id: expected_manifestation})
    deployment = Deployment(nodes=frozenset([node_a]))
    saving = self.persistence_service.save(deployment)
    def saved(ignored):
        creating = self.assertResponseCode('POST', ('/configuration/datasets/%s' % expected_manifestation.dataset.dataset_id.encode('ascii')), {u'primary': u'192.0.2.257'}, BAD_REQUEST)
        return creating
    saving.addCallback(saved)
    return saving
