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."])
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."])
def setUp(self): """ Tether a ball to the room. """ CommandTestCaseMixin.setUp(self) self.ball = Thing(store=self.store, name=u'ball') self.ball.moveTo(self.location) self.tether = Tether.createFor(self.ball, to=self.location) self.otherPlace = Thing(store=self.store, name=u'elsewhere') Container.createFor(self.otherPlace, capacity=1000) Exit.link(self.location, self.otherPlace, u'north')