def test_dev_stats(self): self.dev = Developer(name="Turing") self.assertEqual(self.dev.stats, { "name": "Turing", "type": "developer", "happy": 100, "stress": 0, }, msg="Wrong developer stats")
class TestDeveloperBasics(unittest.TestCase): def setUp(self): self.dev = Developer() def test_dev_stats(self): self.dev = Developer(name="Turing") self.assertEqual(self.dev.stats, { "name": "Turing", "type": "developer", "happy": 100, "stress": 0, }, msg="Wrong developer stats") @patch('game.software.Software') def test_developer_code(self, software): """Check if developer has code method code""" self.assertEqual(self.dev.develop(software), True, msg="Developer has no coding method") @patch('game.software.Software') def test_developer_code_on_100(self, software): """Check if developer cannot code more than 100""" software.add_code.return_value = False self.assertEqual(self.dev.develop(software), False, msg="Developer can code beyond 100 completion") @patch('game.software.Software') def test_developer_release_software(self, software): """Check if developer can release software""" software.be_released.return_value = True self.assertEqual(self.dev.release(software), True, msg="Developer cannot release software")
def setUp(self): self.comp = Company() self.dev = Developer()
def step_impl(context): context.dev = Developer() context.soft = Software("Test")
def step_impl(context): context.dev = Developer() context.soft = Software("Test") context.soft.stats["completion"] = 99
def setUp(self): self.dev = Developer()