def test_suggestion_when_never_employed(self): suggestions = EmploymentHistory.get_suggestion(self.user) self.assertEqual(len(suggestions), 1) suggestion = suggestions[0] self.assertEqual(suggestion["msg"], "Would you like to add your employment history?") self.assertEqual(suggestion["priority"], 5)
def test_suggestion_when_never_employed(self): suggestions = EmploymentHistory.get_suggestion(self.user) self.assertEqual(len(suggestions), 1) suggestion = suggestions[0] self.assertEqual(suggestion['msg'], "Would you like to add your employment history?") self.assertEqual(suggestion['priority'], 5)
def test_suggestion_when_no_employer_is_marked_current(self): EmploymentHistory.objects.create( user=self.user, position_title="Title", organization_name="Organization", start_date=date.today() ) suggestions = EmploymentHistory.get_suggestion(self.user) self.assertEqual(len(suggestions), 1) suggestion = suggestions[0] self.assertEqual(suggestion["msg"], "Have you worked anywhere since being employed" + " with Organization?") self.assertEqual(suggestion["priority"], 1)
def test_suggestion_when_currently_employed(self): EmploymentHistory.objects.create(user=self.user, position_title="Title", organization_name="Organization", start_date=date.today(), current_indicator=True) suggestions = EmploymentHistory.get_suggestion(self.user) self.assertEqual(len(suggestions), 1) suggestion = suggestions[0] self.assertEqual(suggestion['msg'], "Are you still employed with Organization?") self.assertEqual(suggestion['priority'], 0)
def test_suggestion_when_no_employer_is_marked_current(self): EmploymentHistory.objects.create(user=self.user, position_title="Title", organization_name="Organization", start_date=date.today()) suggestions = EmploymentHistory.get_suggestion(self.user) self.assertEqual(len(suggestions), 1) suggestion = suggestions[0] self.assertEqual( suggestion['msg'], "Have you worked anywhere since being employed" + " with Organization?") self.assertEqual(suggestion['priority'], 1)