Skip to content

Commit

Permalink
chore: silenced tests in CI for integration tests that rely on real c…
Browse files Browse the repository at this point in the history
…onnection to third part API
  • Loading branch information
Guibod committed Mar 4, 2023
1 parent ef3b51b commit 02047af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 8 additions & 6 deletions tests/mightstone/services/cardconjurer/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

from mightstone.services.cardconjurer import Card, CardConjurer

from .. import skip_remote_api # noqa: F401


@pytest.mark.asyncio
@pytest.mark.skip("Feature is broken")
class TestCardConjurerRemote(unittest.IsolatedAsyncioTestCase):
@pytest.mark.skip_remote_api
async def test_angular_remote_is_valid(self):
Expand All @@ -24,13 +25,13 @@ async def test_angular_remote_is_valid(self):
)

self.assertEqual(template.metadata.name, "Angular")
self.assertEqual(len(template.context.image_sets["frame"].variants), 8)
self.assertEqual(len(template.context.image_sets[0].variants), 8)
self.assertEqual(
template.context.image_sets["frame"].variants["black"]["name"],
template.context.image_sets[0].variants[0].name,
"Black Frame",
)
self.assertEqual(
template.context.image_sets["frame"].variants["black"]["src"],
template.context.image_sets[0].variants[0].src,
"custom/11-20-22/black.png",
)
self.assertIsInstance(template.card, Card)
Expand All @@ -49,9 +50,9 @@ async def test_simple_token_remote_is_valid(self):
)

self.assertEqual(template.metadata.name, "Custom Frame Template")
self.assertEqual(len(template.context.image_sets["frame"].variants), 2)
self.assertEqual(len(template.context.image_sets[0].variants), 2)
self.assertEqual(
template.context.image_sets["frame"].variants["stats"]["name"],
template.context.image_sets[0].variants[1].name,
"Frame With Stats",
)
self.assertIsInstance(template.card, Card)
Expand All @@ -71,6 +72,7 @@ async def test_tall_archaic_remote_is_valid(self):
self.assertEqual(template.metadata.name, "Tall Archaic")
self.assertEqual(len(template.context.image_sets[0].variants), 9)
self.assertEqual(template.context.image_sets[0].variants[1].name, "Blue Frame")
self.assertIsInstance(template.card, Card)


@pytest.mark.asyncio
Expand Down
4 changes: 3 additions & 1 deletion tests/mightstone/services/test_scryfall.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
UniqueStrategy,
)

from . import skip_remote_api # noqa: F401


@pytest.mark.asyncio
@pytest.mark.skip_remote_api
class ScryfallTest(unittest.IsolatedAsyncioTestCase):
class ScryfallIntegrationTest(unittest.IsolatedAsyncioTestCase):
async def test_request_set_ikoria(self):
s = Scryfall()
model = await s.set("IKO")
Expand Down

0 comments on commit 02047af

Please sign in to comment.