-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: refactor device resource tests to mock API instead of SDK (#371)
We have a few tests for the device resource that cover scenarios that are impossible to reliably recreate in an end-to-end test. These tests were originally based on a mock packngo client, but mocking the SDK hides issues that may come in due to SDK upgrades and requires changing tests when we switch to a different SDK. This updates the device mock tests to use a mock API created with the built-in `httptest` module so that we can more easily validate that the tests continue to pass after upgrading or changing the SDK.
- Loading branch information
Showing
1 changed file
with
38 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters