示例#1
0
 def test_proficiencies_text(self):
     char = Character()
     char._proficiencies_text = ('hello', 'world')
     self.assertEqual(char.proficiencies_text, 'Hello, world.')
     # Check for extra proficiencies
     char.proficiencies_extra = ("it's", "me")
     self.assertEqual(char.proficiencies_text, "Hello, world, it's, me.")
     # Check that race proficienceis are included
     elf = race.HighElf()
     char.race = elf
     expected = "Hello, world, longswords, shortswords, shortbows, longbows, it's, me."
     self.assertEqual(char.proficiencies_text, expected)
示例#2
0
 def test_proficiencies_text(self):
     char = Character()
     char._proficiencies_text = ('hello', 'world')
     self.assertIn('hello', char.proficiencies_text.lower())
     self.assertIn('world', char.proficiencies_text.lower())
     # Check for extra proficiencies
     char._proficiencies_text += ("it's", "me")
     self.assertIn("it's", char.proficiencies_text.lower())
     self.assertIn('me', char.proficiencies_text.lower())
     # Check that race proficienceis are included
     elf = race.HighElf()
     char.race = elf
     expected = ("hello", "world", "longswords", "shortswords", "shortbows",
                 "longbows", "it's", "me")
     for e in expected:
         self.assertIn(e, char.proficiencies_text.lower())