blob: 019d512f96d50228b9b5fea86daf12e0a1bbf526 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import unittest
from swiftstory.Cards import Cards
class TestCards(unittest.TestCase):
def test_get_cards_fr(self):
self.assertTrue(Cards.get_white_cards("fr"))
self.assertTrue(Cards.get_black_cards("fr"))
def test_get_cards_en(self):
self.assertTrue(Cards.get_white_cards("en"))
self.assertTrue(Cards.get_black_cards("en"))
def test_get_cards_unknown_language(self):
try:
Cards.get_white_cards("zz")
except FileNotFoundError:
pass
else:
self.fail("Found zz white cards.")
try:
Cards.get_black_cards("zz")
except FileNotFoundError:
pass
else:
self.fail("Found zz black cards.")
|