How to use the scrython.cards.Collector function in scrython

To help you get started, we’ve selected a few scrython examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NandaScott / Scrython / unittests / TestCards.py View on Github external
sys.path.append('..')

from scrython.cards import Id, Autocomplete, Search, Collector
import unittest
import time

# Cards for TestCardObjects
mtgo_card = Id(id='e3285e6b-3e79-4d7c-bf96-d920f973b122'); time.sleep(0.1)
non_online_card = Id(id='cfdd00f0-c6aa-4e8b-a035-fb3403711741'); time.sleep(0.1)
frame_effected_card = Id(id='f185a734-a32a-4244-88e8-dabafbfd064f'); time.sleep(0.1)
arena_card = Id(id='5aa75f2b-53c5-47c5-96d2-ab796358a96f'); time.sleep(0.1)
augment = Id(id='abe9fdfa-c361-465e-9639-097d441a3f74'); time.sleep(0.1)
meld = Id(id='0900e494-962d-48c6-8e78-66a489be4bb2'); time.sleep(0.1)
transform = Id(id='aae6fb12-b252-453b-bca7-1ea2a0d6c8dc'); time.sleep(0.1)
vanguard = Id(id='87c1234b-3834-4bba-bef2-05707bb1e8e2'); time.sleep(0.1)
alt_lang_card = Collector(code='ths', collector_number='75', lang='ja'); time.sleep(0.1)
planeswalker = Id(id='4c565076-5db2-47ea-8ee0-4a4fd7bb353d'); time.sleep(0.1)

autocomplete = Autocomplete(q='Thal'); time.sleep(0.1)

search = Search(q='f:commander')

class TestCardObjects(unittest.TestCase):

    def __init__(self, *args, **kwargs):
        super(TestCardObjects, self).__init__(*args, **kwargs)

    def test_object(self):
        self.assertIsInstance(non_online_card.object(), str)

    def test_id(self):
        self.assertIsInstance(non_online_card.id(), str)