def test_destroy_base(self): ctx = Context(None, None, None, None) o = MudObject("x") o.destroy(ctx)
def test_nonitem_insert_fail(self): something = MudObject("thing that is not an Item") orc = Living("orc", "m", race="half-orc") with self.assertRaises(ActionRefused): orc.insert(something, orc)
def test_mudobj(self): try: x = MudObject("name", "the title", "description") self.fail("assertion error expected") except AssertionError: pass x = MudObject("name", "title", "description") x.init() x.heartbeat(None) with self.assertRaises(ActionRefused): x.activate(None) with self.assertRaises(ActionRefused): x.deactivate(None) with self.assertRaises(ActionRefused): x.manipulate("frobnitz", None) with self.assertRaises(ActionRefused): x.read(None) x.destroy(Context())
def test_mudobj(self): try: x = MudObject("name", "the title", "description") self.fail("assertion error expected") except AssertionError: pass x = MudObject("name", "title", "description") x.init() x.heartbeat(None) with self.assertRaises(ActionRefused): x.activate(None) with self.assertRaises(ActionRefused): x.deactivate(None) with self.assertRaises(ActionRefused): x.manipulate("frobnitz", None) with self.assertRaises(ActionRefused): x.read(None) x.destroy(Context(None, None, None, None))
def test_destroy_base(self): ctx = Context() o = MudObject("x") o.destroy(ctx)