From 357f2fffe3a49a3bbf4fb2f142d967a3ec49513d Mon Sep 17 00:00:00 2001 From: Nanda Scott Date: Tue, 23 Oct 2018 14:52:32 -0400 Subject: [PATCH] Created unit test for sets --- unittests/TestSets.py | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 unittests/TestSets.py diff --git a/unittests/TestSets.py b/unittests/TestSets.py new file mode 100644 index 0000000..a5ad0bf --- /dev/null +++ b/unittests/TestSets.py @@ -0,0 +1,59 @@ +# This workaround makes sure that we can import from the parent dir +import sys +sys.path.append('..') + +from scrython.sets import Code +import unittest +import time + +promo_khans = Code('PKTK') + +khans = Code('KTK') + + +class TestSets(unittest.TestCase): + + def test_object(self): + self.assertIsInstance(khans.object(), str) + + def test_code(self): + self.assertIsInstance(khans.code(), str) + + def test_mtgo_code(self): + self.assertIsInstance(khans.mtgo_code(), str) + + def test_name(self): + self.assertIsInstance(khans.name(), str) + + def test_set_type(self): + self.assertIsInstance(khans.set_type(), str) + + def test_released_at(self): + self.assertIsInstance(khans.released_at(), str) + + def test_block_code(self): + self.assertIsInstance(khans.block_code(), str) + + def test_block(self): + self.assertIsInstance(khans.block(), str) + + def test_parent_set_code(self): + self.assertIsInstance(promo_khans.parent_set_code(), str) + + def test_card_count(self): + self.assertIsInstance(khans.card_count(), int) + + def test_digital(self): + self.assertIsInstance(khans.digital(), bool) + + def test_foil_only(self): + self.assertIsInstance(khans.foil_only(), bool) + + def test_icon_svg_uri(self): + self.assertIsInstance(khans.icon_svg_uri(), str) + + def test_search_uri(self): + self.assertIsInstance(khans.search_uri(), str) + +if __name__ == '__main__': + unittest.main() \ No newline at end of file