'If a volume is specified with a dataset that is being used by another
application, a conflict error is returned.'

def test_in_use_dataset(self):

    dataset_id = unicode(uuid4())
    d = self.assertResponseCode('POST', '/configuration/datasets', {u'dataset_id': dataset_id, u'primary': self.NODE_A}, CREATED)
    d.addCallback((lambda _: self.assertResponseCode('POST', '/configuration/containers', {u'node_uuid': self.NODE_A, u'name': u'postgres', u'image': u'postgres', u'volumes': [{u'dataset_id': dataset_id, u'mountpoint': u'/db'}]}, CREATED)))
    d.addCallback((lambda _: self.assertResult('POST', '/configuration/containers', {u'node_uuid': self.NODE_A, u'name': u'postgres2', u'image': u'postgres', u'volumes': [{u'dataset_id': dataset_id, u'mountpoint': u'/db'}]}, CONFLICT, {u'description': u'The    dataset    is    being    used    by    another    container.'})))
    return d
