mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-05-19 12:33:27 +02:00
Add 2 tests
This commit is contained in:
Regular → Executable
+6
@@ -21,6 +21,7 @@ class TestCharacter(TestCase):
|
||||
char.level = 2
|
||||
char.hit_dice_faces = 10
|
||||
self.assertEqual(char.hit_dice, '2d10')
|
||||
self.assertEqual(char.hp_max, 10)
|
||||
|
||||
def test_set_attrs(self):
|
||||
char = Character()
|
||||
@@ -37,6 +38,11 @@ class TestCharacter(TestCase):
|
||||
# Check that race gets set to an object
|
||||
char.set_attrs(race='high elf')
|
||||
self.assertIsInstance(char.race, race.HighElf)
|
||||
# Check inspiration works
|
||||
char.set_attrs(inspiration=True)
|
||||
self.assertTrue(char.inspiration)
|
||||
char.set_attrs(inspiration=False)
|
||||
self.assertFalse(char.inspiration)
|
||||
|
||||
def test_wield_weapon(self):
|
||||
char = Character()
|
||||
|
||||
Reference in New Issue
Block a user