Repository: getsentry/responses

Issue:
Reset not triggered when assert_all_requests_are_fired raises using decorator
### Describe the bug

I am not sure if `@responses.activate(assert_all_requests_are_fired=True)` is used normally but I found it easy to use for pytest tests. However, I found a problem using it this way:

See example. The second function here will fail since `RequestsMock.__exit__()` raises in `self.stop()` and therefore never reaches `self.reset()`.

A easy and solid fix would be to implement it like this:
```
    def __exit__(self, type: Any, value: Any, traceback: Any) -> bool:
        success = type is None
        try:
            self.stop(allow_assert=success)
        finally:
            self.reset()
        return success
```


### Additional context

_No response_

### Version of `responses`

0.22.0

### Steps to Reproduce

```python

@responses.activate(assert_all_requests_are_fired=True)
def test_some_function():
    # This one does not reset
    responses.add(responses.GET, 'other_url', json={})
    requests.get('some_api')


@responses.activate(assert_all_requests_are_fired=True)
def test_some_second_function():
    # This one will fail
    responses.add(responses.GET, 'some_api', json={})
    requests.get('some_api')
```

### Expected Result

Consecutive tests in pytest should not fail.

### Actual Result

Consecutive tests in pytest now fail because `reset()` is not triggered in previous tests.

Comments:

Patch:
diff --git a/CHANGES b/CHANGES
index 5542677..325a044 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@
 * Fix type annotations of `CallList`. See #593
 * Replaced toml with tomli and tomli-w.
 * `request` object is attached to any custom exception provided as `Response` `body` argument. See #588
+* Fixed mocked responses leaking between tests when `assert_all_requests_are_fired` and a request was not fired.
 
 0.22.0
 ------
diff --git a/responses/__init__.py b/responses/__init__.py
index 937b5c7..a24e12c 100644
--- a/responses/__init__.py
+++ b/responses/__init__.py
@@ -924,8 +924,10 @@ class RequestsMock(object):
 
     def __exit__(self, type: Any, value: Any, traceback: Any) -> bool:
         success = type is None
-        self.stop(allow_assert=success)
-        self.reset()
+        try:
+            self.stop(allow_assert=success)
+        finally:
+            self.reset()
         return success
 
     @overload


Test patch:
diff --git a/responses/tests/test_responses.py b/responses/tests/test_responses.py
index e8197a3..90c1d65 100644
--- a/responses/tests/test_responses.py
+++ b/responses/tests/test_responses.py
@@ -1133,6 +1133,28 @@ def test_assert_all_requests_are_fired():
     assert_reset()
 
 
+def test_assert_all_requests_fired_multiple():
+    @responses.activate(assert_all_requests_are_fired=True)
+    def test_some_function():
+        # Not all mocks are called so we'll get an AssertionError
+        responses.add(responses.GET, "http://other_url", json={})
+        responses.add(responses.GET, "http://some_api", json={})
+        requests.get("http://some_api")
+
+    @responses.activate(assert_all_requests_are_fired=True)
+    def test_some_second_function():
+        # This should pass as mocks should be reset.
+        responses.add(responses.GET, "http://some_api", json={})
+        requests.get("http://some_api")
+
+    with pytest.raises(AssertionError):
+        test_some_function()
+    assert_reset()
+
+    test_some_second_function()
+    assert_reset()
+
+
 def test_allow_redirects_samehost():
     redirecting_url = "http://example.com"
     final_url_path = "/1"