def test_class_selection_lower(self, mock_user_input):
     self.assertTrue(dungeonsanddragons.class_selection().islower())
 def test_class_selection_input(self, mock_user_input):
     self.assertEqual(dungeonsanddragons.class_selection(), "ranger")
Beispiel #3
0
 def test_incorrect_input(self, mock_input, mock_stdout):
     expected_output = 'You did not enter a correct class, try again\n'
     class_selection()
     output = mock_stdout.getvalue()
     self.assertEqual(output, expected_output)
Beispiel #4
0
 def test_correct_class_selection(self, mock_input):
     self.assertTrue(class_selection() == 'barbarian')
Beispiel #5
0
 def test_capital_letters(self, mock_input):
     self.assertTrue(class_selection() == 'sorcerer')