Exemplo n.º 1
0
    def test_oneManEnters(self):
        """
        Test that when a fellow jaunts into a venue inhabited by a mouse of the
        Nipponese persuasion, a hiragana allocution follows.
        """
        clock = task.Clock()

        closetContainer = commandutils.createLocation(self.store, u"Closet",
                                                      None)
        closet = closetContainer.thing

        mouse = mice.createHiraganaMouse(store=self.store,
                                         name=self.mouseName,
                                         proper=True)
        mouseActor = iimaginary.IActor(mouse)
        mousehood = mouseActor.getIntelligence()
        mousehood._callLater = clock.callLater
        mouse.moveTo(closet)

        objects.Exit.link(self.location, closet, u"north")

        self._test("north", [
            commandutils.E("[ Closet ]"),
            commandutils.E("( south )"),
            commandutils.E(u"Here, you see " + self.mouseName + u".")
        ], ["Test Player leaves north."])

        clock.advance(mousehood.challengeInterval)

        self._test(None, [self.speechPattern])
Exemplo n.º 2
0
    def test_oneManEnters(self):
        """
        Test that when a fellow jaunts into a venue inhabited by a mouse of the
        Nipponese persuasion, a hiragana allocution follows.
        """
        clock = task.Clock()

        closetContainer = commandutils.createLocation(
            self.store, u"Closet", None)
        closet = closetContainer.thing

        mouse = mice.createHiraganaMouse(
            store=self.store,
            name=self.mouseName,
            proper=True)
        mouseActor = iimaginary.IActor(mouse)
        mousehood = mouseActor.getIntelligence()
        mousehood._callLater = clock.callLater
        mouse.moveTo(closet)

        objects.Exit.link(self.location, closet, u"north")

        self._test(
            "north",
            [commandutils.E("[ Closet ]"),
             commandutils.E("( south )"),
             commandutils.E(u"Here, you see " + self.mouseName + u".")],
            ["Test Player leaves north."])

        clock.advance(mousehood.challengeInterval)

        self._test(None, [self.speechPattern])
Exemplo n.º 3
0
    def setUp(self):
        self.store = store.Store()

        self.mouseName = u"\N{KATAKANA LETTER PI}\N{KATAKANA LETTER SMALL YU}"
        self.mouse = mice.createHiraganaMouse(
            store=self.store,
            name=self.mouseName)
Exemplo n.º 4
0
    def setUp(self):
        self.store = store.Store()

        self.clock = objects.Thing(store=self.store, name=u"Clock")
        self.clockContainer = objects.Container.createFor(self.clock,
                                                          capacity=10)

        self.mouseName = u"\N{KATAKANA LETTER PI}\N{KATAKANA LETTER SMALL YU}"
        self.mouse = mice.createHiraganaMouse(store=self.store,
                                              name=self.mouseName)
        self.mouseActor = iimaginary.IActor(self.mouse)
        self.mousehood = self.mouseActor.getIntelligence()
        self.mouse.moveTo(self.clock)

        (self.player, self.playerActor,
         self.playerIntelligence) = commandutils.createPlayer(
             self.store, u"Mean Old Man")

        self.player.moveTo(self.clock)

        self.reactorTime = task.Clock()
        self.mousehood._callLater = self.reactorTime.callLater
Exemplo n.º 5
0
    def setUp(self):
        self.store = store.Store()

        self.clock = objects.Thing(store=self.store, name=u"Clock")
        self.clockContainer = objects.Container.createFor(self.clock, capacity=10)

        self.mouseName = u"\N{KATAKANA LETTER PI}\N{KATAKANA LETTER SMALL YU}"
        self.mouse = mice.createHiraganaMouse(
            store=self.store,
            name=self.mouseName)
        self.mouseActor = iimaginary.IActor(self.mouse)
        self.mousehood = self.mouseActor.getIntelligence()
        self.mouse.moveTo(self.clock)

        (self.player,
         self.playerActor,
         self.playerIntelligence) = commandutils.createPlayer(self.store,
                                                              u"Mean Old Man")


        self.player.moveTo(self.clock)

        self.reactorTime = task.Clock()
        self.mousehood._callLater = self.reactorTime.callLater
Exemplo n.º 6
0
    def setUp(self):
        self.store = store.Store()

        self.mouseName = u"\N{KATAKANA LETTER PI}\N{KATAKANA LETTER SMALL YU}"
        self.mouse = mice.createHiraganaMouse(store=self.store,
                                              name=self.mouseName)