def test_create_duplicate_name(self):
        name = u"thename"
        # Create a dataset out-of-band with matching name but non-matching
        # dataset ID:
        d = self.flocker_client.create_dataset(
            self.NODE_A, int(DEFAULT_SIZE.to_Byte()),
            metadata={NAME_FIELD: name})
        d.addCallback(lambda _: self.create(name))
        d.addCallback(
            lambda _: self.flocker_client.list_datasets_configuration())
        d.addCallback(lambda results: self.assertEqual(len(list(results)), 1))
        return d
If a dataset with the given name already exists,
dataset/ETHPy150Open ClusterHQ/flocker/flocker/dockerplugin/test/test_api.py/APITestsMixin.test_create_duplicate_name