def test_check_previous_matches(self): self.fresh_setup() t = Profile.objects.get(first_name='tiffany') a = Profile.objects.get(first_name='andrew') pj = Profile.objects.get(first_name='philip') self.assertEqual(Command.check_previous_matches(Command(), a, t), True) self.assertEqual(Command.check_previous_matches(Command(), a, pj), True)
def test_check_previous_matches_with_future_matches(self): self.future_matches_setup() t = Profile.objects.get(first_name='tiffany') a = Profile.objects.get(first_name='andrew') pj = Profile.objects.get(first_name='philip') k = Profile.objects.get(first_name='karima') tim = Profile.objects.get(first_name='tim') mike = Profile.objects.get(first_name='michael') self.assertEqual(Command.check_previous_matches(Command(), a, t), False) self.assertEqual(Command.check_previous_matches(Command(), a, pj), False) self.assertEqual(Command.check_previous_matches(Command(), a, mike), False) self.assertEqual(Command.check_previous_matches(Command(), k, mike), True) self.assertEqual(Command.check_previous_matches(Command(), k, tim), False)