コード例 #1
0
ファイル: tests.py プロジェクト: warmb2009/muddery
 def test_batch_commands(self):
     # cannot test batchcode here, it must run inside the server process
     self.call(batchprocess.CmdBatchCommands(), "example_batch_cmds", "Running Batchcommand processor  Automatic mode for example_batch_cmds")
     # we make sure to delete the button again here to stop the running reactor
     confirm = building.CmdDestroy.confirm
     building.CmdDestroy.confirm = False
     self.call(building.CmdDestroy(), "button", "button was destroyed.")
     building.CmdDestroy.confirm = confirm
コード例 #2
0
 def test_destroy_sequence(self):
     confirm = building.CmdDestroy.confirm
     building.CmdDestroy.confirm = False
     self.call(
         building.CmdDestroy(),
         "{}-{}".format(self.obj1.dbref, self.obj2.dbref),
         "Obj was destroyed.\nObj2 was destroyed.",
     )
コード例 #3
0
 def test_destroy(self):
     confirm = building.CmdDestroy.confirm
     building.CmdDestroy.confirm = False
     self.call(building.CmdDestroy(), "", "Usage: ")
     self.call(building.CmdDestroy(), "Obj", "Obj was destroyed.")
     self.call(building.CmdDestroy(), "Obj", "Obj2 was destroyed.")
     self.call(
         building.CmdDestroy(),
         "Obj",
         "Could not find 'Obj'.| (Objects to destroy "
         "must either be local or specified with a unique #dbref.)",
     )
     self.call(
         building.CmdDestroy(), settings.DEFAULT_HOME,
         "You are trying to delete")  # DEFAULT_HOME should not be deleted
     self.char2.location = self.room2
     charid = self.char2.id
     room1id = self.room1.id
     room2id = self.room2.id
     self.call(
         building.CmdDestroy(),
         self.room2.dbref,
         "Char2(#{}) arrives to Room(#{}) from Room2(#{}).|Room2 was destroyed."
         .format(charid, room1id, room2id),
     )
     building.CmdDestroy.confirm = confirm
コード例 #4
0
ファイル: tests.py プロジェクト: warmb2009/muddery
 def test_wipe(self):
     confirm = building.CmdDestroy.confirm
     building.CmdDestroy.confirm = False
     self.call(building.CmdDestroy(), "Obj", "Obj was destroyed.")
     building.CmdDestroy.confirm = confirm
コード例 #5
0
    def at_cmdset_creation(self):
        "Populates the cmdset"

        # The general commands
        self.add(general.CmdLook())
        self.add(general.CmdMove())
        # self.add(general.CmdHome())
        self.add(general.CmdInventory())
        # self.add(general.CmdPose())
        # self.add(general.CmdNick())
        # self.add(general.CmdSetDesc())
        self.add(general.CmdGet())
        self.add(general.CmdDrop())
        # self.add(general.CmdGive())
        # self.add(general.CmdSay())
        # self.add(general.CmdWhisper())
        # self.add(general.CmdAccess())

        # The help system
        self.add(help.CmdHelp())
        self.add(help.CmdSetHelp())

        # System commands
        self.add(system.CmdPy())
        self.add(system.CmdScripts())
        self.add(system.CmdObjects())
        self.add(system.CmdAccounts())
        self.add(system.CmdService())
        self.add(system.CmdAbout())
        self.add(system.CmdTime())
        self.add(system.CmdServerLoad())
        # self.add(system.CmdPs())
        self.add(system.CmdTickers())

        # Admin commands
        self.add(admin.CmdBoot())
        self.add(admin.CmdBan())
        self.add(admin.CmdUnban())
        self.add(admin.CmdEmit())
        self.add(admin.CmdPerm())
        self.add(admin.CmdWall())
        self.add(admin.CmdForce())

        # Building and world manipulation
        self.add(building.CmdTeleport())
        self.add(building.CmdSetObjAlias())
        self.add(building.CmdListCmdSets())
        self.add(building.CmdWipe())
        self.add(building.CmdSetAttribute())
        self.add(building.CmdName())
        self.add(building.CmdDesc())
        self.add(building.CmdCpAttr())
        self.add(building.CmdMvAttr())
        self.add(building.CmdCopy())
        self.add(building.CmdFind())
        self.add(building.CmdOpen())
        self.add(building.CmdLink())
        self.add(building.CmdUnLink())
        self.add(building.CmdCreate())
        self.add(building.CmdDig())
        self.add(building.CmdTunnel())
        self.add(building.CmdDestroy())
        self.add(building.CmdExamine())
        self.add(building.CmdTypeclass())
        self.add(building.CmdLock())
        self.add(building.CmdScript())
        self.add(building.CmdSetHome())
        self.add(building.CmdTag())
        self.add(building.CmdSpawn())

        # Batchprocessor commands
        self.add(batchprocess.CmdBatchCommands())
        self.add(batchprocess.CmdBatchCode())
コード例 #6
0
ファイル: tests.py プロジェクト: phantummm/evennia
 def test_wipe(self):
     self.call(building.CmdDestroy(), "Obj", "Obj was destroyed.")