In the model used here, the bot is the only thing that actually does any write-type action; i.e., it is the thing that creates issues/comments, and also the thing that sends emails. For testing, we'll just mock out these aspects and trust (hope?) that the upstream APIs don't break.
[ ] Mock PyGithub's github.Repository in the Bot.repo property. Needs:
[ ] Mock for create_issue
[ ] Mock for get_issue (which needs a mock for create_comment)
[ ] Mock for get_issues with state either 'open' or 'all'
[ ] At least one issue should be non-ticket (missing front matter)
On the SMTP class, for now we'll just skip testing (or fully mock out) sendmail, although it might be interesting to set up testing using something like Greenmail.
In the model used here, the bot is the only thing that actually does any write-type action; i.e., it is the thing that creates issues/comments, and also the thing that sends emails. For testing, we'll just mock out these aspects and trust (hope?) that the upstream APIs don't break.
github.Repository
in theBot.repo
property. Needs:create_issue
get_issue
(which needs a mock forcreate_comment
)get_issues
with state either'open'
or'all'
On the
SMTP
class, for now we'll just skip testing (or fully mock out) sendmail, although it might be interesting to set up testing using something like Greenmail.