From fbc456c48e9495b1f56f9cb9b96dec1beb133453 Mon Sep 17 00:00:00 2001 From: Sumpfork Date: Fri, 20 Nov 2015 16:49:15 -0800 Subject: [PATCH] language tests --- tests/carddb_tests.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/carddb_tests.py b/tests/carddb_tests.py index 1d3f42b..0b9e873 100644 --- a/tests/carddb_tests.py +++ b/tests/carddb_tests.py @@ -31,3 +31,17 @@ class TestCardDB(unittest.TestCase): for c in cards: self.assertIsInstance(c, domdiv_cards.Card) self.assertIn(c.cardset, valid_cardsets) + + def test_languages(self): + # for now, just test that they load + options, args = domdiv.parse_opts(['commandname', '--language', 'it']) + options.data_path = '.' + cards = domdiv.read_write_card_data(options) + self.assertTrue(cards, 'Italians cards did not read properly') + self.assertIn("Maledizione", [card.name for card in cards]) + + options, args = domdiv.parse_opts(['commandname', '--language', 'de']) + options.data_path = '.' + cards = domdiv.read_write_card_data(options) + self.assertTrue(cards, 'German cards did not read properly') + self.assertIn("Fluch", [card.name for card in cards])