'If the volume for a dataset is attached to the node but the filesystem
does not exist and the configuration says the dataset is meant to be
manifest on the node, ``BlockDeviceDeployer.calculate_changes`` returns
a state change to create the filesystem.'

def test_create_filesystem(self):

    device = FilePath('/dev/sda')
    node_state = self.ONE_DATASET_STATE.set(manifestations={}, paths={}, devices={self.DATASET_ID: device})
    node_config = to_node(self.ONE_DATASET_STATE)
    assert_calculated_changes(self, node_state, node_config, {Dataset(dataset_id=unicode(self.DATASET_ID), maximum_size=LOOPBACK_MINIMUM_ALLOCATABLE_SIZE)}, in_parallel(changes=[CreateFilesystem(device=device, filesystem=u'ext4')]), discovered_datasets=[DiscoveredDataset(state=DatasetStates.ATTACHED_NO_FILESYSTEM, dataset_id=self.DATASET_ID, blockdevice_id=_create_blockdevice_id_for_test(self.DATASET_ID), maximum_size=LOOPBACK_MINIMUM_ALLOCATABLE_SIZE, device_path=device)])
