def test_dx_run_app_locally_without_auth(self): temp_file_path = tempfile.mkdtemp() app_spec = { "name": "test_run_locally_without_auth", "dxapi": "1.0.0", "runSpec": { "file": "code.py", "interpreter": "python2.7" }, "inputSpec": [{ "name": "foo", "class": "file" }], "outputSpec": [], "version": "1.0.0" } app_dir_path = os.path.join(temp_file_path, app_spec['name']) os.mkdir(app_dir_path) with open(os.path.join(app_dir_path, 'dxapp.json'), 'w') as manifest: manifest.write(json.dumps(app_spec)) with open(os.path.join(app_dir_path, 'code.py'), 'w') as code_file: code_file.write('') with testutil.without_auth(), testutil.without_project_context(): with self.assertSubprocessFailure(stderr_regexp="logged in", exit_code=3): run("dx-run-app-locally " + pipes.quote(app_dir_path) + " -ifoo=nothing")
def test_dx_run_app_locally_without_auth(self): temp_file_path = tempfile.mkdtemp() app_spec = dict(testutil.DXTestCaseBuildApps.base_app_spec, name="test_run_locally_without_auth", inputSpec = [{"name": "foo", "class": "file"}]) app_dir_path = os.path.join(temp_file_path, app_spec['name']) os.mkdir(app_dir_path) with open(os.path.join(app_dir_path, 'dxapp.json'), 'w') as manifest: manifest.write(json.dumps(app_spec)) with open(os.path.join(app_dir_path, 'code.py'), 'w') as code_file: code_file.write('') with testutil.without_auth(), testutil.without_project_context(): with self.assertSubprocessFailure(stderr_regexp="logged in", exit_code=3): run("dx-run-app-locally " + pipes.quote(app_dir_path) + " -ifoo=nothing")
def test_dx_run_app_locally_without_auth(self): temp_file_path = tempfile.mkdtemp() app_spec = { "name": "test_run_locally_without_auth", "dxapi": "1.0.0", "runSpec": {"file": "code.py", "interpreter": "python2.7"}, "inputSpec": [{"name": "foo", "class": "file"}], "outputSpec": [], "version": "1.0.0" } app_dir_path = os.path.join(temp_file_path, app_spec['name']) os.mkdir(app_dir_path) with open(os.path.join(app_dir_path, 'dxapp.json'), 'w') as manifest: manifest.write(json.dumps(app_spec)) with open(os.path.join(app_dir_path, 'code.py'), 'w') as code_file: code_file.write('') with testutil.without_auth(), testutil.without_project_context(): with self.assertSubprocessFailure(stderr_regexp="logged in", exit_code=3): run("dx-run-app-locally " + pipes.quote(app_dir_path) + " -ifoo=nothing")