File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed
Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 11"""Test `pymonzo.accounts` module."""
22
3+ import os
4+
35import pytest
46from polyfactory .factories .pydantic_factory import ModelFactory
57from pytest_mock import MockerFixture
@@ -101,6 +103,10 @@ def test_get_default_account(
101103 mocked_accounts_list .reset_mock ()
102104
103105 @pytest .mark .vcr ()
106+ @pytest .mark .skipif (
107+ os .getenv ("VCRPY_ENCRYPTION_KEY" ) is None ,
108+ reason = "`VCRPY_ENCRYPTION_KEY` is not available on GitHub PRs." ,
109+ )
104110 def test_list_vcr (
105111 self ,
106112 mocker : MockerFixture ,
Original file line number Diff line number Diff line change 11"""Test `pymonzo.balance` module."""
22
3+ import os
4+
35import httpx
46import pytest
57import respx
@@ -86,6 +88,10 @@ def test_list_respx(
8688 assert mocked_route .called
8789
8890 @pytest .mark .vcr ()
91+ @pytest .mark .skipif (
92+ os .getenv ("VCRPY_ENCRYPTION_KEY" ) is None ,
93+ reason = "`VCRPY_ENCRYPTION_KEY` is not available on GitHub PRs." ,
94+ )
8995 def test_list_vcr (self , balance_resource : BalanceResource ) -> None :
9096 """API response is parsed into expected schema."""
9197 balance = balance_resource .get ()
Original file line number Diff line number Diff line change 11"""Test `pymonzo.pots` module."""
22
3+ import os
4+
35import httpx
46import pytest
57import respx
@@ -131,6 +133,10 @@ def test_get_default_pot(
131133 mocked_pots_list .reset_mock ()
132134
133135 @pytest .mark .vcr ()
136+ @pytest .mark .skipif (
137+ os .getenv ("VCRPY_ENCRYPTION_KEY" ) is None ,
138+ reason = "`VCRPY_ENCRYPTION_KEY` is not available on GitHub PRs." ,
139+ )
134140 def test_list_vcr (self , pots_resource : PotsResource ) -> None :
135141 """API response is parsed into expected schema."""
136142 pots_list = pots_resource .list ()
Original file line number Diff line number Diff line change 11"""Test `pymonzo.whoami` module."""
22
3+ import os
4+
35import pytest
46
57from pymonzo import MonzoAPI
@@ -16,6 +18,10 @@ class TestWhoAmIResource:
1618 """Test `WhoAmIResource` class."""
1719
1820 @pytest .mark .vcr ()
21+ @pytest .mark .skipif (
22+ os .getenv ("VCRPY_ENCRYPTION_KEY" ) is None ,
23+ reason = "`VCRPY_ENCRYPTION_KEY` is not available on GitHub PRs." ,
24+ )
1925 def test_whoami_vcr (self , whoami_resource : WhoAmIResource ) -> None :
2026 """API response is parsed into expected schema."""
2127 whoami = whoami_resource .whoami ()
You can’t perform that action at this time.
0 commit comments