From f5edd5035d06adc7b6bceb1f521b4911706cde0b Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Wed, 29 Dec 2021 19:36:59 +0100 Subject: Import resource_stream to reduce size of lines Signed-off-by: Olivier Gayot --- tests/test_cards.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test_cards.py b/tests/test_cards.py index 605984b..b0992b6 100644 --- a/tests/test_cards.py +++ b/tests/test_cards.py @@ -13,13 +13,13 @@ class TestCards(unittest.TestCase): ]) black_cards = json.dumps(["Black Card 1", "Black Card 2"]) - with patch("swiftstory.cards.pkg_resources.resource_stream", mock_open(read_data=white_cards)): + with patch("swiftstory.cards.resource_stream", mock_open(read_data=white_cards)): self.assertIn("White Card 2", Cards.get_white_cards("en")) - with patch("swiftstory.cards.pkg_resources.resource_stream", mock_open(read_data=black_cards)): + with patch("swiftstory.cards.resource_stream", mock_open(read_data=black_cards)): self.assertIn("Black Card 1", Cards.get_black_cards("en")) def test_get_cards_unknown_language(self): - with patch("swiftstory.cards.pkg_resources.resource_stream", side_effect=FileNotFoundError): + with patch("swiftstory.cards.resource_stream", side_effect=FileNotFoundError): with self.assertRaises(FileNotFoundError): Cards.get_white_cards("zz") with self.assertRaises(FileNotFoundError): -- cgit v1.2.3