EvalAI
EvalAI copied to clipboard
Add tests for hosts/models.py
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_emailmethod inChallengeHostTeammodel. - [ ] In said function, create a test case that sets up multiple
ChallengeHostobjects associated with aChallengeHostTeam. (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.