getsentry / getsentry/responses
RequestsMock.add() and .upsert() parameter names are different
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 378
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
It's just a little pain point, but `.add()` uses `method` while `.upsert()` uses `method_or_response` for the HTTP method parameter name. Both can use the same actual values, but the formal names are different.
Why is this a problem (at least for me)? I will sometimes send in the inputs by applying `**` to a dict. If the formal parameter names are different, it's a PITA to change the dict keys if I have to swap `.add()` vs. `.upsert()`.
```python
arg_dict = {
"method": "GET",
"url": "https://www.cnn.com/",
# ...
}
responses.add(**arg_dict) # this works
responses.upsert(**arg_dict) # this doesn't
```
If you think it's worthwhile I can create a little PR to change it.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.