Esempio n. 1
0
 def get_question_answers(self) -> List:
     return [
         Question(self.survey.answers['Q1_answer']
                  ).get_how_long_hair_do_you_have_answer(),
         Question(self.survey.answers['Q2_answer']
                  ).get_how_often_do_you_wash_your_hair_answer(),
         Question(self.survey.answers['Q3_answer']
                  ).get_what_kind_of_problems_do_you_have_answer(),
         Question(self.survey.answers['Q4_answer']
                  ).get_whats_the_price_for_your_shampoo_answer(),
         Question(self.survey.answers['Q5_answer']).
         get_solutions_you_can_do_at_home_answer(),
     ]
Esempio n. 2
0
    def test_answer_bamboo_hair(self):
        actual_result = Question(
            ['Bamboo hair']).get_what_kind_of_problems_do_you_have_answer()

        expected_result: str = TestTexts.QUESTION_3_ANSWER_3_else

        self.assertEqual(actual_result, expected_result)
    def test_answer_i_dont_know(self):
        actual_result: str = Question(
            {'choice': "I don't know"}
        ).get_solutions_you_can_do_at_home_answer()

        expected_result: str = TestTexts.ANSWER_IDK

        self.assertEqual(actual_result, expected_result)
    def test_answer_no(self):
        actual_result: str = Question(
            {'choice': 'No'}
        ).get_solutions_you_can_do_at_home_answer()

        expected_result: str = TestTexts.ANSWER_NO

        self.assertEqual(actual_result, expected_result)
Esempio n. 5
0
    def test_answer_dandruff_dry_hair_psoriasis(self):
        actual_result: str = Question(
            ['Dandruff', 'Dry hair',
             'Psoriasis']).get_what_kind_of_problems_do_you_have_answer()

        expected_result: str = TestTexts.QUESTION_3_ANSWER_1

        self.assertEqual(actual_result, expected_result)
Esempio n. 6
0
    def test_answer_head_lice_psoriasis(self):
        actual_result: str = Question(
            ['Head lice',
             'Psoriasis']).get_what_kind_of_problems_do_you_have_answer()

        expected_result: str = TestTexts.QUESTION_3_ANSWER_2

        self.assertEqual(actual_result, expected_result)
Esempio n. 7
0
    def test_answer_very_oily_hair_dry_hair_dandruff(self):
        actual_result: str = Question(
            ['Very oily hair', 'Dry hair',
             'Dandruff']).get_what_kind_of_problems_do_you_have_answer()

        expected_result: str = TestTexts.QUESTION_3_ANSWER_3

        self.assertEqual(actual_result, expected_result)
Esempio n. 8
0
    def test_answer_very_short(self):
        actual_result: str = Question(
            'Very short'
        ).get_how_long_hair_do_you_have_answer()

        expected_result: str = TestTexts.ANSWER_VERY_SHORT

        self.assertEqual(actual_result, expected_result)
Esempio n. 9
0
    def test_answer_long(self):
        actual_result: str = Question(
            'Long'
        ).get_how_long_hair_do_you_have_answer()

        expected_result: str = TestTexts.ANSWER_LONG

        self.assertEqual(actual_result, expected_result)
Esempio n. 10
0
    def test_answer_medium(self):
        actual_result: str = Question(
            'Medium'
        ).get_how_long_hair_do_you_have_answer()

        expected_result: str = TestTexts.ANSWER_MEDIUM

        self.assertEqual(actual_result, expected_result)
Esempio n. 11
0
    def test_answer_everyday(self):
        actual_result: str = Question(
            'Everyday'
        ).get_how_often_do_you_wash_your_hair_answer()

        expected_result: str = TestTexts.ANSWER_EVERDAY_AND_ANSWER_2_TIMES

        self.assertEqual(actual_result, expected_result)
Esempio n. 12
0
    def test_answer_three_times(self):
        actual_result: str = Question(
            '3 times a week'
        ).get_how_often_do_you_wash_your_hair_answer()

        expected_result: str = TestTexts.ANSWER_1_TIME_AND_ANSWER_3_TIMES

        self.assertEqual(actual_result, expected_result)
    def test_answer_wrong_message(self):
        actual_result: str = Question(
            {
                'choice': 'Wrong inserted message'
            }
        ).get_solutions_you_can_do_at_home_answer()

        expected_result: str = TestTexts.ANSWER_YES_else

        self.assertEqual(actual_result, expected_result)
    def test_answer_yes_aloe_liquid_dont_wash(self):
        actual_result: str = Question(
            {
                'choice': 'Yes',
                'yes_choices': ['Applying Aloe liquid',
                                'Do not washing']
            }
        ).get_solutions_you_can_do_at_home_answer()

        expected_result: str = TestTexts.ANSWER_YES_aloe_not_washing

        self.assertEqual(actual_result, expected_result)
    def test_answer_yes_lemon_garlic_water(self):
        actual_result: str = Question(
            {
                'choice': 'Yes',
                'yes_choices': ['Applying lemon',
                                'Applying garlic water']
            }
        ).get_solutions_you_can_do_at_home_answer()

        expected_result: str = TestTexts.ANSWER_YES_lemon_garlicwater

        self.assertEqual(actual_result, expected_result)