def test_lifecycle_and_mode(self): cmdr = EDCmdr() cmdr.game_mode = "Open" cmdr.inception() self.assertTrue(cmdr.in_open()) cmdr.killed() self.assertFalse(cmdr.in_open()) cmdr.resurrect() self.assertTrue(cmdr.in_open())
def test_in_open(self): cmdr = EDCmdr() self.assertFalse(cmdr.in_open()) cmdr = EDCmdr() cmdr.game_mode = "" self.assertFalse(cmdr.in_open()) cmdr = EDCmdr() cmdr.game_mode = "dummy" self.assertFalse(cmdr.in_open()) cmdr = EDCmdr() cmdr.game_mode = "Open" self.assertTrue(cmdr.in_open()) cmdr = EDCmdr() cmdr.game_mode = "open" self.assertFalse(cmdr.in_open()) cmdr = EDCmdr() cmdr.game_mode = "Group" self.assertFalse(cmdr.in_open()) cmdr = EDCmdr() cmdr.game_mode = "Solo" self.assertFalse(cmdr.in_open())