-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
728 mail aliases needs a new test suite #746
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are a good start. I have a couple of suggestions:
- It would be nice if the names of the test functions conveyed more information about what you're testing about the functions. The Django convention is to use long descriptive function names in tests, rather than docstrings, however, there's nothing wrong with adding a docstring if this isn't possible or if you want to be more descriptive. Part 5 of the Django tutorial has good information about this.
- It would be really good to have a test that covers the case for when the MAIL_ALIASES_PATH file isn't found.
aliaslist.append(alias3) | ||
aliaslist.append(alias4) | ||
aliaslist.append(alias5) | ||
self.assertEqual(filter_by_value(aliaslist, ""), aliaslist) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good to see you testing for the empty string case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, tests pass on my machine. I don't have any suggestions other than that I agree with the suggestion to have the site for the case where there is no file at MAIL_ALIASES_PATH
, and then to also write a test confirming that the site doesn't blow up with an internal server error when that file is missing. With-finalizing in parse_file
looks good.
Closing the PR... |
Fixes #728
Changes in this request