コード例 #1
0
 def test_check_dex_roll_attacker_equal(self, mock_randint):
     expected = False
     actual = check_dex_roll(
         {
             'Name': "test",
             'Race': "test",
             'Class': "test",
             'HP': [1, 1],
             'Strength': 1,
             'Dexterity': 1,
             'Constitution': 1,
             'Intelligence': 1,
             'Wisdom': 1,
             'Charisma': 1,
             'XP': 0,
             'Inventory': []
         }, {
             'Name': "test2",
             'Race': "test2",
             'Class': "test2",
             'HP': [1, 1],
             'Strength': 1,
             'Dexterity': 10,
             'Constitution': 1,
             'Intelligence': 1,
             'Wisdom': 1,
             'Charisma': 1,
             'XP': 0,
             'Inventory': []
         })
     self.assertEqual(expected, actual)
コード例 #2
0
 def test_check_dex_roll_attacker_equal_is_bool(self, mock_randint):
     actual = check_dex_roll(
         {
             'Name': "test",
             'Race': "test",
             'Class': "test",
             'HP': [1, 1],
             'Strength': 1,
             'Dexterity': 1,
             'Constitution': 1,
             'Intelligence': 1,
             'Wisdom': 1,
             'Charisma': 1,
             'XP': 0,
             'Inventory': []
         }, {
             'Name': "test2",
             'Race': "test2",
             'Class': "test2",
             'HP': [1, 1],
             'Strength': 1,
             'Dexterity': 10,
             'Constitution': 1,
             'Intelligence': 1,
             'Wisdom': 1,
             'Charisma': 1,
             'XP': 0,
             'Inventory': []
         })
     self.assertIs(type(actual), bool)