Example #1
0
 def test_destroy_base(self):
     ctx = Context(None, None, None, None)
     o = MudObject("x")
     o.destroy(ctx)
Example #2
0
 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)
Example #3
0
 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())
Example #4
0
 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))
Example #5
0
 def test_destroy_base(self):
     ctx = Context()
     o = MudObject("x")
     o.destroy(ctx)