Example #1
0
    def test_suggestion_when_military_service_blank(self):
        suggestions = MilitaryService.get_suggestion(self.user)

        self.assertEqual(len(suggestions), 1)
        suggestion = suggestions[0]
        self.assertEqual(suggestion["msg"], "Have you served in the armed forces?")
        self.assertEqual(suggestion["priority"], 3)
Example #2
0
    def test_suggestion_when_military_service_blank(self):
        suggestions = MilitaryService.get_suggestion(self.user)

        self.assertEqual(len(suggestions), 1)
        suggestion = suggestions[0]
        self.assertEqual(suggestion['msg'],
                         "Have you served in the armed forces?")
        self.assertEqual(suggestion['priority'], 3)
Example #3
0
    def test_suggestion_when_military_service_provided(self):
        MilitaryService.objects.create(user=self.user,
                                       branch="Army")
        suggestions = MilitaryService.get_suggestion(self.user)

        self.assertEqual(len(suggestions), 0)
Example #4
0
    def test_suggestion_when_military_service_provided(self):
        MilitaryService.objects.create(user=self.user, branch="Army")
        suggestions = MilitaryService.get_suggestion(self.user)

        self.assertEqual(len(suggestions), 0)