def test_set_command(self):
        from shinymud.models.area import Area
        from shinymud.data import config
        from shinymud.models.player import Player
        from shinymud.commands.commands import Set
        bob = Player(('bob', 'bar'))
        bob.mode = None
        bob.playerize({'name':'bob', 'password':'pork'})
        
        # Test setting e-mail
        Set(bob, 'email bob@bob.com', 'set').run()
        self.assertEqual('bob@bob.com', bob.email)
        
        # Test setting title
        Set(bob, 'title is the best EVAR', 'set').run()
        self.assertEqual('is the best EVAR', bob.title)
        
        # Try to set goto_appear and goto_disappear (both should fail
        # since this player shouldn't have permissions)
        Set(bob, 'goto_appear Bob pops in from nowhere.', 'set').run()
        eresult = 'You don\'t have the permissions to set that.'
        self.assertTrue(eresult in bob.outq)
        bob.outq = []
        Set(bob, 'goto_disappear foo', 'set').run()
        self.assertTrue(eresult in bob.outq)
        
        bob.permissions = bob.permissions | config.BUILDER
        
        # Try to set goto_appear and goto_disappear (both should now
        # succeed now that the player has adequate permissions)
        Set(bob, 'goto_appear Bob pops in from nowhere.', 'set').run()
        self.assertEqual('Bob pops in from nowhere.', bob.goto_appear)
        bob.outq = []
        Set(bob, 'goto_disappear foo', 'set').run()
        self.assertEqual('foo', bob.goto_disappear)
dataset/ETHPy150Open shinymud/ShinyMUD/tests/shinytest/commands/test_commands.py/TestGeneralCommands.test_set_command/original