Exemplo n.º 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")]
Exemplo n.º 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")]
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 5
0
 def test_targetSet_messages(self):
     targetSet(self.actor, "robert", self.target)
     assert self.actor.delegate.received == [TargetSetEvent("robert",
                                                            self.target)]
Exemplo n.º 6
0
 def test_targetSet(self):
     targetSet(self.actor, 'robert', self.target)
     assert self.actor.targetting_shorts['robert'] is self.target