Beispiel #1
0
 def test_speakTo_fails_target_out_of_room(self):
     speakTo(self.actor, self.other_room_target, "foo")
     assert self.actor.delegate.received == [UnfoundObjectEvent()]
Beispiel #2
0
 def test_speakTo_room_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     assert self.onlooker.delegate.received == \
                       [SpeakToThirdEvent(self.actor, self.target, "foo")]
Beispiel #3
0
 def test_speakTo_fails_with_nonTargettableObject(self):
     speakTo(self.actor, MUDObject(None), "foo")
     assert self.actor.delegate.received == [UnfoundObjectEvent()]
Beispiel #4
0
 def test_speakTo_actor_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     assert self.actor.delegate.received == [SpeakToFirstEvent(self.target,
                                                               "foo")]
Beispiel #5
0
 def test_speakTo_target_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     print self.target.delegate.received
     assert self.target.delegate.received == [SpeakToSecondEvent(self.actor,
                                                                 "foo")]
Beispiel #6
0
 def test_speakTo_fails_target_out_of_room(self):
     speakTo(self.actor, self.other_room_target, "foo")
     assert self.actor.delegate.received == [UnfoundObjectEvent()]
Beispiel #7
0
 def test_speakTo_fails_with_nonTargettableObject(self):
     speakTo(self.actor, MUDObject(None), "foo")
     assert self.actor.delegate.received == [UnfoundObjectEvent()]
Beispiel #8
0
 def test_speakTo_room_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     assert self.onlooker.delegate.received == \
                       [SpeakToThirdEvent(self.actor, self.target, "foo")]
Beispiel #9
0
 def test_speakTo_target_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     print self.target.delegate.received
     assert self.target.delegate.received == [
         SpeakToSecondEvent(self.actor, "foo")
     ]
Beispiel #10
0
 def test_speakTo_actor_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     assert self.actor.delegate.received == [
         SpeakToFirstEvent(self.target, "foo")
     ]