def test_class_selection_global_third(self, mock_user_input): """Assert that class selection is updated in character global variable.""" class_selection() self.assertEqual(pokemon, {'Name': 'Dave', 'Class': 'Bulbasaur\n', 'Position': [0, 0], 'HP': 10})
def test_class_selection_error(self, mock_user_input): """Assert an AttributeError with an int.""" with self.assertRaises(AttributeError): class_selection()
def test_class_selection(self, mock_stdout, mock_user_input): """Assert incorrect output message based on user input.""" expected_output = "Please enter a number to choose your Pokemon type!\n" class_selection() self.assertEqual(mock_stdout.getvalue(), expected_output)
def test_class_selection_global_first(self, mock_user_input): """Assert that class selection is updated in global variable.""" class_selection() self.assertEqual(pokemon, {'Name': 'Dave', 'Class': 'Squirtle', 'Position': [0, 0], 'HP': 10})
def test_error_class_selection(self, mock_choose_inventory): self.assertEqual(class_selection(), None)
def test_first_class_selection(self, mock_choose_inventory): expected_output = 'Bounty Hunter' self.assertEqual(class_selection(), expected_output)
def test_seventh_class_selection(self, mock_choose_inventory): expected_output = 'Smuggler' self.assertEqual(class_selection(), expected_output)
def test_eighth_class_selection(self, mock_choose_inventory): expected_output = 'Trooper' self.assertEqual(class_selection(), expected_output)
def test_sixth_class_selection(self, mock_choose_inventory): expected_output = 'Sith Inquisitor' self.assertEqual(class_selection(), expected_output)
def test_fifth_class_selection(self, mock_choose_inventory): expected_output = 'Sith Warrior' self.assertEqual(class_selection(), expected_output)
def test_fourth_class_selection(self, mock_choose_inventory): expected_output = 'Jedi Knight' self.assertEqual(class_selection(), expected_output)
def test_third_class_selection(self, mock_choose_inventory): expected_output = 'Jedi Consular' self.assertEqual(class_selection(), expected_output)
def test_second_class_selection(self, mock_choose_inventory): expected_output = 'Imperial Agent' self.assertEqual(class_selection(), expected_output)