def setUp(self):
     self.testDb = SpellsCsvToDict()
def makeSpellCards(spellNames):
    spellDescriptions = SpellsCsvToDict()
    spells = spellDescriptions.getSpells(spellNames)

    pdfPrinter = SpellPdfPrinter(spells)
    pdfPrinter.getSixPerSheetPdf()
class TestSpellsCsvToDict(unittest.TestCase):
    magicMissile = {
        "deity": "",
        "shaman": "NULL",
        "mythic_text": "The damage dealt by each missile increases to 2d4+1. The missiles bypass the shield spell and similar effects that block the non-mythic version of this spell.",
        "cold": "0",
        "good": "0",
        "description": "A missile of magical energy darts forth from your fingertip and strikes its target, dealing 1d4+1 points of force damage. The missile strikes unerringly, even if the target is in melee combat, so long as it has less than total cover or total concealment. Specific parts of a creature can't be singled out. Objects are not damaged by the spell. For every two caster levels beyond 1st, you gain an additional missile-two at 3rd level, three at 5th, four at 7th, and the maximum of five missiles at 9th level or higher. If you shoot multiple missiles, you can have them strike a single creature or several creatures. A single missile can strike only one creature. You must designate targets before you check for spell resistance or roll damage.",
        "description_formated": "<p>A missile of magical energy darts forth from your fingertip and strikes its target, dealing 1d4+1 points of force damage.</p><p>The missile strikes unerringly, even if the target is in melee combat, so long as it has less than total cover or total concealment.</p><p>Specific parts of a creature can't be singled out. Objects are not damaged by the spell.</p><p>For every two caster levels beyond 1st, you gain an additional missile-two at 3rd level, three at 5th, four at 7th, and the maximum of five missiles at 9th level or higher. If you shoot multiple missiles, you can have them strike a single creature or several creatures.</p><p>A single missile can strike only one creature. You must designate targets before you check for spell resistance or roll damage.</p>",
        "electricity": "0",
        "linktext": "http://www.d20pfsrd.com/magic/all-spells/m/magic-missile",
        "witch": "NULL",
        "poison": "0",
        "sor": "1",
        "material_costs": "NULL",
        "subschool": "",
        "bard": "NULL",
        "pain": "0",
        "dismissible": "0",
        "divine_focus": "0",
        "material": "0",
        "effect": "",
        "spell_level": "sorcerer/wizard 1, magus 1, bloodrager 1",
        "area": "",
        "antipaladin": "NULL",
        "name": "Magic Missile",
        "acid": "0",
        "disease": "0",
        "components": "V, S",
        "magus": "1",
        "patron": "",
        "short_description": "\xa01d4+1 damage; +1 missile per two levels above 1st (max 5).",
        "shapeable": "0",
        "alchemist": "NULL",
        "curse": "0",
        "mythic": "1",
        "verbal": "1",
        "ranger": "NULL",
        "fear": "0",
        "chaotic": "0",
        "death": "0",
        "focus": "0",
        "force": "1",
        "adept": "NULL",
        "source": "PFRPG Core",
        "SLA_Level": "1",
        "saving_throw": "none",
        "emotion": "0",
        "spell_resistence": "yes",
        "darkness": "0",
        "full_text": '<link rel="stylesheet"href="PF.css"><div class="heading"><p class="alignleft">Magic Missile</p><div style="clear: both;"></div></div><div><h5><b>School </b>evocation [force]; <b>Level </b>sorcerer/wizard 1, magus 1, bloodrager 1</h5></div><hr/><div><h5><b>CASTING</b></h5></div><hr/><div><h5><b>Casting Time </b>1 standard action</h5><h5><b>Components </b>V, S</h5></div><hr/><div><h5><b>EFFECT</b></h5></div><hr/><div><h5><b>Range </b>medium (100 ft. + 10 ft./level)</h5><h5><b>Targets </b>up to five creatures, no two of which can be more than 15 ft. apart</h5><h5><b>Duration </b>instantaneous</h5><h5><b>Saving Throw </b>none; <b>Spell Resistance </b>yes</h5></div><hr/><div><h5><b>DESCRIPTION</b></h5></div><hr/><div><h4><p>A missile of magical energy darts forth from your fingertip and strikes its target, dealing 1d4+1 points of force damage.</p><p>The missile strikes unerringly, even if the target is in melee combat, so long as it has less than total cover or total concealment.</p><p>Specific parts of a creature can\'t be singled out. Objects are not damaged by the spell.</p><p>For every two caster levels beyond 1st, you gain an additional missile-two at 3rd level, three at 5th, four at 7th, and the maximum of five missiles at 9th level or higher. If you shoot multiple missiles, you can have them strike a single creature or several creatures.</p><p>A single missile can strike only one creature. You must designate targets before you check for spell resistance or roll damage.</p></h4><h5><b>Mythic: </b>The damage dealt by each missile increases to 2d4+1. The missiles bypass the shield spell and similar effects that block the non-mythic version of this spell.</h5><h5><b>Augmented (4th)</b>: If you expend two uses of mythic power, the spell creates double the normal number of missiles (affecting up to 10 creatures), its range increases to line of sight, and it bypasses the targets\' spell resistance and spell immunity.</h5></div>',
        "cleric": "NULL",
        "targets": "up to five creatures, no two of which can be more than 15 ft. apart",
        "sonic": "0",
        "lawful": "0",
        "augmented": "Augmented (4th): If you expend two uses of mythic power, the spell creates double the normal number of missiles (affecting up to 10 creatures), its range increases to line of sight, and it bypasses the targets' spell resistance and spell immunity.",
        "bloodline": "",
        "duration": "instantaneous",
        "summoner": "NULL",
        "light": "0",
        "descriptor": "force",
        "mind_affecting": "0",
        "air": "0",
        "school": "evocation",
        "oracle": "NULL",
        "bloodrager": "1",
        "range": "medium (100 ft. + 10 ft./level)",
        "somatic": "1",
        "domain": "",
        "costly_components": "0",
        "wiz": "1",
        "fire": "0",
        "druid": "NULL",
        "shadow": "0",
        "evil": "0",
        "casting_time": "1 standard action",
        "id": "337",
        "paladin": "NULL",
        "language_dependent": "0",
        "water": "0",
        "inquisitor": "NULL",
        "earth": "0",
    }

    def setUp(self):
        self.testDb = SpellsCsvToDict()

    def test_getSpell(self):
        self.assertEqual(self.testDb.getSpell("magic missile"), self.magicMissile)
        self.assertEqual(self.testDb.getSpell("Magic Missile"), self.magicMissile)
        self.assertIsNone(self.testDb.getSpell("sdlfjsdlfjsdf"), None)