getsentry / getsentry/responses

Unable to debug `responses.post` not matching

Open
#730 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
4.3k
Forks
378
Avg merge
4d 1h
Merged PRs (30d)
1

Description

### Describe the bug

I am probably looking in the wrong place, but I am failing to find documentation on what to do when a matcher fails to match.

I have this code in my test

```python
responses.activate
def test_test():
responses.post(url=MY_URL, json={'some': 'response'})
thread_run(mod.call_it)
```

and then in a different module `mod`
```python
def call_it():
responses.post(url=ALSO_MY_URL, headers=..., data=, timeout=)
```

but I don't get a match. Something is obviously wrong.

Are there any introspections I can do in `call_it` to ask what matchers have been attached and are active?

Or can I turn on verbose logging to see the thought process involved?

I don't even know how to ask if `responses.activate` is still active.

### Additional context

_No response_

### Version of `responses`

0.23.3

### Steps to Reproduce

This was in the main text. This is not a bug report, but a request for help finding documentation.

### Expected Result

I would like help finding the documentation that describes how to debug unexpected outcomes.

### Actual Result

neither me or google can find any debugging or intospection documentation. I'd love to ask the system why it did or did not match a request.

I don't even know how to ask if `responses.activate` is still active.

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.