dropbox / dropbox/pygerduty

Improve and/or document ability to create mock Incident objects

Open
#19 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
165
Forks
71
PR merge metrics
No merged PRs in 30d

Description

Howdy!

Thanks for sharing this! I'm trying to write some unit test coverage (which is running in CI, so I'm mocking out the calls to pagerduty) but am having a rough time figuring out how to generate a mocked out `Incident` object. For a list of Incidents, I was trying something along the lines of:

```
Incidents(Incident(html_url='pagerduty.com/theincident', incident_key='this was a page'))
```

Since it looks like when you request a list of incidents they are wrapped in an `Incidents` (aka a `Collection`). I'm curious if the community already has a pattern for doing this, but if not I'll come back around in a few weeks with a path- either a test fixture, example, or something depending on what everyone prefers.

Thanks!
Joe

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.