Пример #1
0
    def test_common_options_environment_variables(self):
        var_names = [
            ENV.APP_ID,
            ENV.ORGANIZATION_ID,
            ENV.SERVER,
            ENV.TOKEN,
        ]

        for name in var_names:
            os.environ[name] = name

        try:
            args = get_command(['deployment']).args
            self.assertEqual(args.app_id, ENV.APP_ID)
            self.assertEqual(
                args.organization_id, ENV.ORGANIZATION_ID)
            self.assertEqual(args.secret_token, ENV.TOKEN)
            self.assertEqual(args.server, ENV.SERVER)

        finally:
            for name in var_names:
                del os.environ[name]
Пример #2
0
 def get_deployment_command(self, cmdline):
     cmdline = '-t token -o org -a app deployment ' + cmdline
     return get_command(shlex.split(cmdline))