def test_get_ruler(self): name = ["ICE", "AIR", "WATER", "FIRE"] emblem = ["MAMMOTH", "OWL", "OCTOPUS", "DRAGON"] ice_kingdom = Kingdom(name[0], emblem[0]) air_kingdom = Kingdom(name[1], emblem[1]) water_kingdom = Kingdom(name[2], emblem[2]) fire_kingdom = Kingdom(name[3], emblem[3]) ice_kingdom.add_ally(air_kingdom) self.assertIsNone(Kingdom.get_ruler()) ice_kingdom.add_ally(water_kingdom) ice_kingdom.add_ally(air_kingdom) ice_kingdom.add_ally(fire_kingdom) self.assertEqual(ice_kingdom, Kingdom.get_ruler()) self.assertNotEqual(fire_kingdom, Kingdom.get_ruler()) Kingdom.remove_all_kingdoms()
def __ruling_kingdom(self): """Get the Ruler of Southeros Returns: Kingdom Object: Ruling Kingdom Object otherwise None """ return Kingdom.get_ruler()