mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-15 18:13:10 -04:00
dev-python/mastodon-py: add 2.0.1
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
41
dev-python/mastodon-py/files/mastodon-py-2.0.1-tests.patch
Normal file
41
dev-python/mastodon-py/files/mastodon-py-2.0.1-tests.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
Fix compatibility with pytest-recording
|
||||
|
||||
pytest-recording stores cassettes for each module in its own directory.
|
||||
Using "vcr_cassette_dir" fixture, we override it to use the old
|
||||
behavior.
|
||||
|
||||
Part of https://github.com/halcy/Mastodon.py/pull/407
|
||||
|
||||
--- a/tests/conftest.py
|
||||
+++ b/tests/conftest.py
|
||||
@@ -63,6 +63,11 @@ def vcr_config():
|
||||
decode_compressed_response = True
|
||||
)
|
||||
|
||||
+@pytest.fixture(scope="module")
|
||||
+def vcr_cassette_dir(request) -> str:
|
||||
+ module = request.node.fspath # current test file
|
||||
+ return os.path.join(module.dirname, "cassettes")
|
||||
+
|
||||
# Fixtures for testing against actual, real servers
|
||||
# Please be extremely careful with these
|
||||
@pytest.fixture
|
||||
diff --git a/tests/test_streaming.py b/tests/test_streaming.py
|
||||
index 7bbdfc0..0f66519 100644
|
||||
--- a/tests/test_streaming.py
|
||||
+++ b/tests/test_streaming.py
|
||||
@@ -14,11 +14,6 @@ streaming_is_patched = False
|
||||
real_connections = []
|
||||
close_connections = False
|
||||
|
||||
-@pytest.fixture(scope='module')
|
||||
-def vcr(vcr):
|
||||
- vcr.match_on = ['path']
|
||||
- return vcr
|
||||
-
|
||||
@pytest.fixture(scope='module')
|
||||
def vcr_config():
|
||||
return {
|
||||
--
|
||||
2.49.0
|
||||
|
||||
Reference in New Issue
Block a user