Title: Test harness should support variable responses per API endpoint · Issue #93 · packethost/packet-python · GitHub
Open Graph Title: Test harness should support variable responses per API endpoint · Issue #93 · packethost/packet-python
X Title: Test harness should support variable responses per API endpoint · Issue #93 · packethost/packet-python
Description: The current test harness loads a fixture matching the API method and URL components. This approach is limited as there can be only one fixture per URL+method. https://github.com/packethost/packet-python/blob/master/test/test_packet.py#L2...
Open Graph Description: The current test harness loads a fixture matching the API method and URL components. This approach is limited as there can be only one fixture per URL+method. https://github.com/packethost/packet-p...
X Description: The current test harness loads a fixture matching the API method and URL components. This approach is limited as there can be only one fixture per URL+method. https://github.com/packethost/packet-p...
Opengraph URL: https://github.com/packethost/packet-python/issues/93
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Test harness should support variable responses per API endpoint","articleBody":"The current test harness loads a fixture matching the API method and URL components. This approach is limited as there can be only one fixture per URL+method. https://github.com/packethost/packet-python/blob/master/test/test_packet.py#L226-L251\r\n\r\nIn order to test all each branch properly, expected and unexpected, sunny and rainy, responses must be provided as fixtures.\r\n\r\nOne way to get this behavior would be to hash all request parameters and append this into the fixture filename. This would make fixture creation hard because the names would not be predictable. This also wouldn't fulfill the problem because our fixtures should be able to provide various API responses given the same inputs.\r\n\r\nA more versatile solution would be one that allows for numerous fixture responses to be defined per test or for more granularity, per API call.","author":{"url":"https://github.com/displague","@type":"Person","name":"displague"},"datePublished":"2020-07-07T03:42:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/93/packet-python/issues/93"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d74cd5f4-0b03-7ac5-62c8-3cbcfbf3ab89 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF52:B2064:1268769:1751BDB:699113AF |
| html-safe-nonce | eaed91049237a0b34a2d37c127775288a0576bc17389546ce0b3df9d79b47db4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjUyOkIyMDY0OjEyNjg3Njk6MTc1MUJEQjo2OTkxMTNBRiIsInZpc2l0b3JfaWQiOiIzMzE4NDgxNzI2ODM0MDIxMjk1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0993cafcf4f8db8ba607d7178d9db91e9769044c041864c42dc55b8e2f7434d8 |
| hovercard-subject-tag | issue:651971397 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/packethost/packet-python/93/issue_layout |
| twitter:image | https://opengraph.githubassets.com/96018389f3d61faba86840ad1dc8d29c499a296b8a66c6b0b96a1e26dffdb3b0/packethost/packet-python/issues/93 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/96018389f3d61faba86840ad1dc8d29c499a296b8a66c6b0b96a1e26dffdb3b0/packethost/packet-python/issues/93 |
| og:image:alt | The current test harness loads a fixture matching the API method and URL components. This approach is limited as there can be only one fixture per URL+method. https://github.com/packethost/packet-p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | displague |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/packethost/packet-python git https://github.com/packethost/packet-python.git |
| octolytics-dimension-user_id | 7982021 |
| octolytics-dimension-user_login | packethost |
| octolytics-dimension-repository_id | 36143876 |
| octolytics-dimension-repository_nwo | packethost/packet-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36143876 |
| octolytics-dimension-repository_network_root_nwo | packethost/packet-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width