def test_fail_missing_endpoint_parse_arguments(): test_args = ['-d', 'test-directory', '-t', 'test-archive.tgz', '-n', 'test-notebook.ipynb', '-b', 'test-bucket'] with pytest.raises(SystemExit): bootstrapper.parse_arguments(test_args)
def test_fail_missing_directory_parse_arguments(): test_args = ['-e', 'http://test.me.now', '-t', 'test-archive.tgz', '-n', 'test-notebook.ipynb', '-b', 'test-bucket'] with pytest.raises(SystemExit): bootstrapper.parse_arguments(test_args)
def test_parse_arguments(): test_args = [ '-e', 'http://test.me.now', '-d', 'test-directory', '-t', 'test-archive.tgz', '-n', 'test-notebook.ipynb', '-b', 'test-bucket' ] args_dict = bootstrapper.parse_arguments(test_args) assert args_dict['cos-endpoint'] == 'http://test.me.now' assert args_dict['cos-directory'] == 'test-directory' assert args_dict['cos-dependencies-archive'] == 'test-archive.tgz' assert args_dict['cos-bucket'] == 'test-bucket' assert args_dict['notebook'] == 'test-notebook.ipynb' assert not args_dict['inputs'] assert not args_dict['outputs']