def test_parse_answer_from_csv_price_question(self):
        row = self.cloud_support_row.copy()
        question_text = 'How much does the service cost (excluding VAT)?'
        row['Question'] = question_text
        row['Answer 1'] = '£1'
        row['Answer 2'] = 'per hour'

        assert parse_answer_from_csv_row(row, self.questions, question_text, 'cloud-support') == {
            'priceInterval': 'Hour', 'priceMin': '1'
        }
    def test_parse_answer_from_csv_checkbox_question(self):
        row = self.cloud_support_row.copy()
        question_text = 'Tick at least two things'
        row['Question'] = question_text
        row['Answer 1'] = 'Thing 1'
        row['Answer 2'] = 'Thing 2'

        assert parse_answer_from_csv_row(row, self.questions, question_text, 'cloud-support') == [
            'Thing 1', 'Thing 2'
        ]
    def test_parse_answer_from_csv_option_labels(self):
        row = self.cloud_support_row.copy()
        question_text = 'Pick a card any card'
        row['Question'] = question_text
        row['Answer 1'] = 'Option 1'
        row['Answer 2'] = 'Option 2'

        assert parse_answer_from_csv_row(row, self.questions, question_text, 'cloud-support') == [
            'option_1', 'option_2'
        ]
    def test_parse_answer_from_csv_row_service_categories(self):
        row = self.cloud_support_row.copy()
        question_text = 'Which categories does your service fit under?'
        row['Question'] = question_text
        row['Answer 1'] = 'Bathtime'
        row['Answer 2'] = 'Benidorm'
        # Answer 3 column left blank
        row['Answer 4'] = 'Bananas'

        assert parse_answer_from_csv_row(row, self.questions, question_text, 'cloud-support') == [
            'Bathtime', 'Benidorm', 'Bananas'
        ]
    def test_parse_answer_from_csv_single_answer(self):
        row = self.cloud_support_row.copy()
        question_text = 'Enter your name'
        row['Answer 1'] = "Basil Brush"

        assert parse_answer_from_csv_row(row, self.questions, question_text, 'cloud-support') == 'Basil Brush'
 def test_parse_answer_from_csv_row_returns_none_for_blank_answer(self):
     assert parse_answer_from_csv_row(
         self.cloud_support_row, self.questions, 'Very Important Question', 'cloud-support'
     ) is None