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)
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)
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)