'If the ``FlockerClient`` receives a dataset state where primary is
``None`` it parses it correctly.'

def test_unset_primary(self):

    dataset_id = uuid4()
    self.cluster_state_service.apply_changes([NonManifestDatasets(datasets={unicode(dataset_id): ModelDataset(dataset_id=unicode(dataset_id))})])
    d = self.client.list_datasets_state()
    d.addCallback((lambda states: self.assertEqual([DatasetState(dataset_id=dataset_id, primary=None, maximum_size=None, path=None)], states)))
    return d
