Ejemplo n.º 1
0
 def setUp(self):
     """
     Create a room, with a dude in it, and a chair he can sit in.
     """
     CommandTestCaseMixin.setUp(self)
     self.chairThing = Thing(store=self.store, name=u"chair")
     self.chairThing.moveTo(self.location)
     self.chair = Chair.createFor(self.chairThing)
Ejemplo n.º 2
0
 def test_allTiedUp(self):
     """
     If you're tied to a chair, you can't leave.
     """
     chairThing = Thing(store=self.store, name=u'chair')
     chairThing.moveTo(self.location)
     chair = Chair.createFor(chairThing)
     self.assertCommandOutput("sit chair", ["You sit in the chair."],
                              ["Test Player sits in the chair."])
     Tether.createFor(self.player, to=chairThing)
     self.assertCommandOutput("stand up",
                              ["You can't move, you're tied to a chair."],
                              ["Test Player struggles."])
Ejemplo n.º 3
0
 def test_allTiedUp(self):
     """
     If you're tied to a chair, you can't leave.
     """
     chairThing = Thing(store=self.store, name=u'chair')
     chairThing.moveTo(self.location)
     chair = Chair.createFor(chairThing)
     self.assertCommandOutput("sit chair",
                              ["You sit in the chair."],
                              ["Test Player sits in the chair."])
     Tether.createFor(self.player, to=chairThing)
     self.assertCommandOutput(
         "stand up",
         ["You can't move, you're tied to a chair."],
         ["Test Player struggles."])