aboutsummaryrefslogtreecommitdiffstats
path: root/test_cardclass.py
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2015-05-25 20:12:34 +0200
committerEduardo Pedroni <ep625@york.ac.uk>2015-05-25 20:12:34 +0200
commit83ea4d9c54094453fe6e28b6a97a339ea6177f26 (patch)
tree23bea8c41b3706bed30b9e96c5c8216ed03c3a01 /test_cardclass.py
parentfb0875f3f1113269d22c47388b7e730a58a0e362 (diff)
Added many more tests, cached some sample pages
Diffstat (limited to 'test_cardclass.py')
-rwxr-xr-xtest_cardclass.py62
1 files changed, 62 insertions, 0 deletions
diff --git a/test_cardclass.py b/test_cardclass.py
new file mode 100755
index 0000000..fc17d62
--- /dev/null
+++ b/test_cardclass.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python3
+
+import unittest
+import cardbase
+
+class Test_cardClass(unittest.TestCase):
+
+ def setUp(self):
+ self.card = cardbase.Card()
+
+ # Tests
+ def test_cardHasTitle(self):
+ self.assertIsNotNone(self.card.title)
+
+ def test_cardHasCost(self):
+ self.assertIsNotNone(self.card.cost)
+
+ def test_cardHasColour(self):
+ self.assertIsNotNone(self.card.colour)
+
+ def test_cardHasType(self):
+ self.assertIsNotNone(self.card.type)
+
+ def test_cardHasSubType(self):
+ self.assertIsNotNone(self.card.subtype)
+
+ def test_cardHasEdition(self):
+ self.assertIsNotNone(self.card.edition)
+
+ def test_cardHasScan(self):
+ self.assertIsNotNone(self.card.scan)
+
+ def test_cardHasArtist(self):
+ self.assertIsNotNone(self.card.artist)
+
+ def test_cardHasText(self):
+ self.assertIsNotNone(self.card.text)
+
+ def test_cardHasFlavour(self):
+ self.assertIsNotNone(self.card.flavour)
+
+ def test_cardHasRarity(self):
+ self.assertIsNotNone(self.card.rarity)
+
+ def test_cardHasNumber(self):
+ self.assertIsNotNone(self.card.number)
+
+ def test_cardHasPower(self):
+ self.assertIsNotNone(self.card.power)
+
+ def test_cardHasToughness(self):
+ self.assertIsNotNone(self.card.toughness)
+
+ def test_cardHasLoyalty(self):
+ self.assertIsNotNone(self.card.loyalty)
+
+def test():
+ unittest.main(exit=False)
+
+# The entry point
+if __name__ == "__main__":
+ test()