def testandset(self):
        if not self.locked:
            self.locked = True
            return True
        else:
            return False
User AppCommands can execute when a single app name is provided
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/mutex.py/mutex.testandset--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/admin_scripts/tests.py/CommandTypes.test_app_command