def testInvalidCommand(self): cli = CLI() # Check for incorrect command with self.assertRaises(ClindException): cli.processCommand("not a command")
def testName(self): cli = CLI() name = cli.processCommand("name") # Check that name command returns a string with space self.assertTrue(isinstance(name, str)) self.assertTrue(" " in name)
def testRoll(self): cli = CLI() # Check roll command for i in range(100): r = cli.processCommand("roll 1d20") self.assertTrue(1 <= r <= 20)