Exemple #1
0
 def test_speakToWrapper_with_target(self):
     targetSet(self.actor, "foo", self.target)
     self.actor.delegate.received = []
     speakToWrapper(self.actor, "$foo, bar", self.info)
     res = self.actor.delegate.received
     print res
     assert res == [SpeakToFirstEvent(self.target, "bar")]
Exemple #2
0
 def test_speakToWrapper_with_target(self):
     targetSet(self.actor, "foo", self.target)
     self.actor.delegate.received = []
     speakToWrapper(self.actor, "$foo, bar", self.info)
     res = self.actor.delegate.received
     print res
     assert res == [SpeakToFirstEvent(self.target, "bar")]
Exemple #3
0
 def setUp(self):
     self.room = AnonyRoom()
     self.target = TargettableObject(
         "a killer rabbit", set(['killer', 'rabbit', 'bunny', 'fluffy']),
         self.room)
     self.setup_for_object(self.target)
     self.actor = MUDObject(self.room)
     self.setup_for_object(self.actor)
     targetSet(self.actor, "bob", self.target)
     self.info = LineInfoMockup(self.actor)
     self.bogusroom = AnonyRoom()
Exemple #4
0
 def setUp(self):
     self.room = AnonyRoom()
     self.target = TargettableObject("a killer rabbit", 
                                     set(['killer', 'rabbit', 'bunny', 
                                          'fluffy']), 
                                     self.room)
     self.setup_for_object(self.target)
     self.actor = MUDObject(self.room)
     self.setup_for_object(self.actor)
     targetSet(self.actor, "bob", self.target)
     self.info = LineInfoMockup(self.actor)
     self.bogusroom = AnonyRoom()
 def test_targetSet_messages(self):
     targetSet(self.actor, "robert", self.target)
     assert self.actor.delegate.received == [TargetSetEvent("robert",
                                                            self.target)]
 def test_targetSet(self):
     targetSet(self.actor, 'robert', self.target)
     assert self.actor.targetting_shorts['robert'] is self.target