Skip to content

Commit 4201cd3

Browse files
committed
Simplify real_http implementation
1 parent 4007578 commit 4201cd3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/mock_vws/_requests_mock_server/decorators.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,8 @@ def __enter__(self) -> Self:
152152
)
153153

154154
if self._real_http:
155-
combined_pattern = "|".join(
156-
f"(?:{pattern.pattern})" for pattern in compiled_url_patterns
157-
)
158-
negated_pattern = f"(?!{combined_pattern})."
159-
compiled_negated_pattern = re.compile(pattern=negated_pattern)
160-
mock.add_passthru(prefix=compiled_negated_pattern)
155+
all_requests_pattern = re.compile(pattern=".*")
156+
mock.add_passthru(prefix=all_requests_pattern)
161157

162158
self._mock = mock
163159
self._mock.start()

0 commit comments

Comments
 (0)