Skip to content

Tests for Bot #29

Description

@dwhswenson

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions