def test_questionnaire_store_deletes(self):
        # Given
        expected = get_basic_input()
        store = QuestionnaireStore(self.storage)
        store.metadata = expected['METADATA']
        store.answer_store.answers = expected['ANSWERS']
        store.completed_blocks = [
            Location.from_dict(expected['COMPLETED_BLOCKS'][0])
        ]

        # When
        store.delete()  # See setUp - populates self.output_data

        # Then
        self.assertEqual(store.completed_blocks, [])
        self.assertEqual(store.metadata, {})
        self.assertEqual(store.answer_store.count(), 0)
    def test_questionnaire_store_deletes(self):
        # Given
        expected = get_basic_input()
        store = QuestionnaireStore(self.storage)
        store.set_metadata(expected["METADATA"])
        store.collection_metadata = expected["COLLECTION_METADATA"]
        store.answer_store = AnswerStore(expected["ANSWERS"])
        store.progress_store = ProgressStore(expected["PROGRESS"])

        # When
        store.delete()  # See setUp - populates self.output_data

        # Then
        self.assertNotIn("a-test-section", store.progress_store)
        self.assertEqual(store.metadata.copy(), {})
        self.assertEqual(len(store.answer_store), 0)
        self.assertEqual(store.collection_metadata, {})