class RobotTests(unittest.TestCase): def setUp(self): self.mega_man = Robot("Mega Man", battery=50) def test_charge(self): # make new robot each time # mega_man = Robot("Mega Man", battery=50) # Use setUp to make robot once self.mega_man.charge() self.assertEqual(self.mega_man.battery, 100) def test_say_name(self): # make new robot each time # mega_man = Robot("Mega Man", battery=50) # Use setUp to make robot once self.assertEqual(self.mega_man.say_name(), "BEEP BOOP BEEP BOOP. I AM MEGA MAN") self.assertEqual(self.mega_man.battery, 49)