EvalAI icon indicating copy to clipboard operation
EvalAI copied to clipboard

Add tests for hosts/models.py

Open Zahed-Riyaz opened this issue 8 months ago • 0 comments

This is a sub-issue of #4476

Currently the unit tests for hosts/models.py covers only the __str__ methods in both the classes. ChallengeHostTeam class has another function, namely : get_all_challenge_host_email. For thorough testing, here's a tasklist :

  • [ ] Write a test function for get_all_challenge_host_email method in ChallengeHostTeam model.
  • [ ] In said function, create a test case that sets up multiple ChallengeHost objects associated with a ChallengeHostTeam. (Account for multiple users in a team)
  • [ ] Check if the number of users matches the number of users returned by the function, also check if they are each included in the returned list.
  • [ ] Assert that the returned list contains all expected email addresses, and no other email address.

I will raise a PR with all the tasks covered.

Zahed-Riyaz avatar Mar 29 '25 10:03 Zahed-Riyaz