├── .editorconfig ├── .gitignore ├── .gitlab-ci.yml ├── .travis.yml ├── LICENSE ├── MANIFEST.in ├── README.md ├── git_repo ├── __init__.py ├── exceptions.py ├── extract_config.py ├── kwargparse.py ├── repo.py ├── services │ ├── __init__.py │ ├── ext │ │ ├── __init__.py │ │ ├── bitbucket.py │ │ ├── gerrit.py │ │ ├── gitbucket.py │ │ ├── github.py │ │ ├── gitlab.py │ │ └── gogs.py │ └── service.py └── tools.py ├── requirements-test.txt ├── requirements.txt ├── setup.py ├── tests ├── __init__.py ├── conftest.py ├── helpers.py └── integration │ ├── cassettes │ ├── test_bitbucket_test_00_fork.json │ ├── test_bitbucket_test_01_create.json │ ├── test_bitbucket_test_02_delete.json │ ├── test_bitbucket_test_03_delete_nouser.json │ ├── test_bitbucket_test_04_clone.json │ ├── test_bitbucket_test_05_add.json │ ├── test_bitbucket_test_06_add__name.json │ ├── test_bitbucket_test_07_add__alone.json │ ├── test_bitbucket_test_08_add__alone_name.json │ ├── test_bitbucket_test_09_add__default.json │ ├── test_bitbucket_test_10_add__default_name.json │ ├── test_bitbucket_test_11_add__alone_default.json │ ├── test_bitbucket_test_12_add__alone_default_name.json │ ├── test_bitbucket_test_13_snippet_list.json │ ├── test_bitbucket_test_14_snippet_list_with_gist.json │ ├── test_bitbucket_test_15_snippet_list_with_bad_gist.json │ ├── test_bitbucket_test_16_snippet_clone_with_gist.json │ ├── test_bitbucket_test_17_snippet_fetch_with_gist.json │ ├── test_bitbucket_test_18_snippet_fetch_with_bad_gist.json │ ├── test_bitbucket_test_19_snippet_fetch_with_gist_file.json │ ├── test_bitbucket_test_20_snippet_fetch_with_bad_gist_file.json │ ├── test_bitbucket_test_21_snippet_create_gist_file.json │ ├── test_bitbucket_test_22_snippet_create_gist_file_list.json │ ├── test_bitbucket_test_23_snippet_create_gist_dir.json │ ├── test_bitbucket_test_24_snippet_create_gist_file.json │ ├── test_bitbucket_test_25_snippet_create_gist_file_list.json │ ├── test_bitbucket_test_26_snippet_create_gist_dir.json │ ├── test_bitbucket_test_27_snippet_delete.json │ ├── test_bitbucket_test_28_snippet_delete__not_exist.json │ ├── test_bitbucket_test_29_snippet_create_snippet__file_not_exist.json │ ├── test_bitbucket_test_30_request_list.json │ ├── test_bitbucket_test_30_request_list_empty.json │ ├── test_bitbucket_test_31_request_fetch__bad_request.json │ ├── test_bitbucket_test_31_request_fetch__good.json │ ├── test_bitbucket_test_32_request_create__bad_branch.json │ ├── test_bitbucket_test_32_request_create__bad_repo.json │ ├── test_bitbucket_test_32_request_create__good.json │ ├── test_bitbucket_test_34_list__long.json │ ├── test_bitbucket_test_34_list__short.json │ ├── test_gerrithub_test_00_clone.json │ ├── test_gerrithub_test_01_review.json │ ├── test_gerrithub_test_02_fetch_patchset.json │ ├── test_gerrithub_test_03_fetch_patchset__patchset.json │ ├── test_gerrithub_test_04_fetch_patchset__full.json │ ├── test_gerrithub_test_05_fetch_patchset__change_id.json │ ├── test_gerrithub_test_06_list_patchsets.json │ ├── test_gerrithub_test_07_add.json │ ├── test_gitbucket_test_00_fork.json │ ├── test_gitbucket_test_01_create__already_exists.json │ ├── test_gitbucket_test_01_create__new.json │ ├── test_gitbucket_test_02_delete.json │ ├── test_gitbucket_test_03_delete_nouser.json │ ├── test_gitbucket_test_04_clone.json │ ├── test_gitbucket_test_04_clone__too_many_slashes.json │ ├── test_gitbucket_test_05_add.json │ ├── test_gitbucket_test_06_add__name.json │ ├── test_gitbucket_test_07_add__alone.json │ ├── test_gitbucket_test_08_add__alone_name.json │ ├── test_gitbucket_test_09_add__default.json │ ├── test_gitbucket_test_10_add__default_name.json │ ├── test_gitbucket_test_11_add__alone_default.json │ ├── test_gitbucket_test_12_add__alone_default_name.json │ ├── test_gitbucket_test_13_gist_list.json │ ├── test_gitbucket_test_14_gist_list_with_gist.json │ ├── test_gitbucket_test_15_gist_list_with_bad_gist.json │ ├── test_gitbucket_test_16_gist_clone_with_gist.json │ ├── test_gitbucket_test_17_gist_fetch_with_gist.json │ ├── test_gitbucket_test_18_gist_fetch_with_bad_gist.json │ ├── test_gitbucket_test_19_gist_fetch_with_gist_file.json │ ├── test_gitbucket_test_20_gist_fetch_with_bad_gist_file.json │ ├── test_gitbucket_test_21_gist_create_gist_file.json │ ├── test_gitbucket_test_22_gist_create_gist_file_list.json │ ├── test_gitbucket_test_23_gist_create_gist_dir.json │ ├── test_gitbucket_test_24_gist_create_gist_file.json │ ├── test_gitbucket_test_25_gist_create_gist_file_list.json │ ├── test_gitbucket_test_26_gist_create_gist_dir.json │ ├── test_gitbucket_test_27_gist_delete.json │ ├── test_gitbucket_test_28_gist_delete__not_exist.json │ ├── test_gitbucket_test_29_gist_create_gist__file_not_exist.json │ ├── test_github_test_00_fork.json │ ├── test_github_test_01_create__already_exists.json │ ├── test_github_test_01_create__new.json │ ├── test_github_test_01_create_organization__already_exists.json │ ├── test_github_test_01_create_organization__new.json │ ├── test_github_test_02_delete.json │ ├── test_github_test_03_delete_nouser.json │ ├── test_github_test_04_clone.json │ ├── test_github_test_05_add.json │ ├── test_github_test_06_add__name.json │ ├── test_github_test_07_add__alone.json │ ├── test_github_test_08_add__alone_name.json │ ├── test_github_test_09_add__default.json │ ├── test_github_test_10_add__default_name.json │ ├── test_github_test_11_add__alone_default.json │ ├── test_github_test_12_add__alone_default_name.json │ ├── test_github_test_12_add__guess.json │ ├── test_github_test_12_add__upstream.json │ ├── test_github_test_13_gist_list.json │ ├── test_github_test_14_gist_list_with_gist.json │ ├── test_github_test_14_request_fetch.json │ ├── test_github_test_15_gist_list_with_bad_gist.json │ ├── test_github_test_15_request_fetch__bad_request.json │ ├── test_github_test_16_gist_clone_with_gist.json │ ├── test_github_test_17_gist_fetch_with_gist.json │ ├── test_github_test_18_gist_fetch_with_bad_gist.json │ ├── test_github_test_19_gist_fetch_with_gist_file.json │ ├── test_github_test_20_gist_fetch_with_bad_gist_file.json │ ├── test_github_test_21_gist_create_gist_file.json │ ├── test_github_test_22_gist_create_gist_file_list.json │ ├── test_github_test_23_gist_create_gist_dir.json │ ├── test_github_test_24_gist_create_gist_file.json │ ├── test_github_test_25_gist_create_gist_file_list.json │ ├── test_github_test_26_gist_create_gist_dir.json │ ├── test_github_test_27_gist_delete.json │ ├── test_github_test_28_gist_delete__not_exist.json │ ├── test_github_test_29_gist_create_gist__file_not_exist.json │ ├── test_github_test_30_request_list.json │ ├── test_github_test_31_request_fetch.json │ ├── test_github_test_31_request_fetch__bad_request.json │ ├── test_github_test_32_request_create.json │ ├── test_github_test_32_request_create__bad_branch.json │ ├── test_github_test_32_request_create__bad_repo.json │ ├── test_github_test_32_request_create__guess_branch.json │ ├── test_github_test_32_request_create__guess_repo.json │ ├── test_github_test_33_request_open.json │ ├── test_github_test_34_list__long.json │ ├── test_github_test_34_list__short.json │ ├── test_gitlab_test_00_fork.json │ ├── test_gitlab_test_01_create__already_exists.json │ ├── test_gitlab_test_01_create__new.json │ ├── test_gitlab_test_01_create_group__already_exists.json │ ├── test_gitlab_test_01_create_group__new.json │ ├── test_gitlab_test_02_delete.json │ ├── test_gitlab_test_03_delete_nouser.json │ ├── test_gitlab_test_04_clone.json │ ├── test_gitlab_test_04_clone__subgroup.json │ ├── test_gitlab_test_05_add.json │ ├── test_gitlab_test_06_add__name.json │ ├── test_gitlab_test_07_add__alone.json │ ├── test_gitlab_test_08_add__alone_name.json │ ├── test_gitlab_test_09_add__default.json │ ├── test_gitlab_test_10_add__default_name.json │ ├── test_gitlab_test_11_add__alone_default.json │ ├── test_gitlab_test_12_add__alone_default_name.json │ ├── test_gitlab_test_13_snippet_list_alone.json │ ├── test_gitlab_test_13_snippet_list_with_non_existent_project.json │ ├── test_gitlab_test_13_snippet_list_with_project.json │ ├── test_gitlab_test_14_snippet_clone.json │ ├── test_gitlab_test_15_snippet_fetch_global_snippet.json │ ├── test_gitlab_test_15_snippet_fetch_project_snippet.json │ ├── test_gitlab_test_15_snippet_fetch_with_bad_project_snippet.json │ ├── test_gitlab_test_16_snippet_create_secret_snippet_global_file.json │ ├── test_gitlab_test_16_snippet_create_secret_snippet_project_file.json │ ├── test_gitlab_test_16_snippet_create_snippet__file_not_exist.json │ ├── test_gitlab_test_16_snippet_create_snippet_dir.json │ ├── test_gitlab_test_16_snippet_create_snippet_file_list.json │ ├── test_gitlab_test_16_snippet_create_snippet_global_file.json │ ├── test_gitlab_test_16_snippet_create_snippet_project_file.json │ ├── test_gitlab_test_17_snippet_global_delete.json │ ├── test_gitlab_test_17_snippet_global_delete__not_exist.json │ ├── test_gitlab_test_17_snippet_project_delete.json │ ├── test_gitlab_test_17_snippet_project_delete__not_exist.json │ ├── test_gitlab_test_18_request_list.json │ ├── test_gitlab_test_19_request_fetch.json │ ├── test_gitlab_test_19_request_fetch__bad_request.json │ ├── test_gitlab_test_20_request_create.json │ ├── test_gitlab_test_20_request_create__bad_branch.json │ ├── test_gitlab_test_20_request_create__bad_repo.json │ ├── test_gitlab_test_20_request_create__blank_branch.json │ ├── test_gitlab_test_20_request_create_with_edit_and_no_title.json │ ├── test_gogs_test_01_create__already_exists.json │ ├── test_gogs_test_01_create__new.json │ ├── test_gogs_test_01_create_group__already_exists.json │ ├── test_gogs_test_01_create_group__new.json │ ├── test_gogs_test_02_delete.json │ ├── test_gogs_test_03_delete_nouser.json │ ├── test_gogs_test_04_clone.json │ ├── test_gogs_test_04_clone__too_many_slashes.json │ ├── test_gogs_test_05_add.json │ ├── test_gogs_test_06_add__name.json │ ├── test_gogs_test_07_add__alone.json │ ├── test_gogs_test_08_add__alone_name.json │ ├── test_gogs_test_09_add__default.json │ ├── test_gogs_test_10_add__default_name.json │ ├── test_gogs_test_11_add__alone_default.json │ └── test_gogs_test_12_add__alone_default_name.json │ ├── data │ ├── a_directory │ │ ├── random-fortune-1.txt │ │ ├── random-fortune-2.txt │ │ ├── random-fortune-3.txt │ │ └── random-fortune-4.txt │ ├── random-fortune-1.txt │ ├── random-fortune-2.txt │ ├── random-fortune-3.txt │ └── random-fortune-4.txt │ ├── local │ ├── gitbucket │ │ ├── README.md │ │ └── init.py │ └── gogs │ │ ├── README.md │ │ ├── custom │ │ └── conf │ │ │ └── app.ini │ │ ├── init.sh │ │ └── init_conf.sh │ ├── test_bitbucket.py │ ├── test_gerrit.py │ ├── test_gitbucket.py │ ├── test_github.py │ ├── test_gitlab.py │ ├── test_gogs.py │ └── test_main.py └── tox.ini /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | # Change these settings to your own preference 10 | indent_style = space 11 | indent_size = 4 12 | 13 | # We recommend you to keep these unchanged 14 | end_of_line = lf 15 | charset = utf-8 16 | trim_trailing_whitespace = true 17 | insert_final_newline = true 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | var/ 2 | *~ 3 | *.swp 4 | build/ 5 | dist/ 6 | bin/ 7 | .ropeproject/ 8 | .installed.cfg 9 | *.egg-info 10 | __pycache__ 11 | .eggs 12 | README.rst 13 | *.egg 14 | .cache/ 15 | .coverage 16 | contrib 17 | docs 18 | .gitignore 19 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | test: 2 | variables: 3 | TRAVIS_GH3: "1" 4 | script: 5 | - apt-get update -qy 6 | - apt-get install -y python3-dev python3-pip virtualenv pandoc 7 | - virtualenv --python=python3 var 8 | - var/bin/pip3 install --upgrade pip 9 | - var/bin/pip3 install -r requirements-test.txt 10 | - var/bin/py.test --cov=git_repo --cov-report term-missing tests 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | # Don't use the Travis Container-Based Infrastructure 3 | sudo: required 4 | dist: trusty 5 | matrix: 6 | include: 7 | - os: linux 8 | python: "3.5" 9 | - os: linux 10 | python: "3.6" 11 | - os: linux 12 | python: "3.6-dev" 13 | - os: linux 14 | python: "3.7-dev" 15 | - os: linux 16 | python: "nightly" 17 | 18 | - os: osx 19 | sudo: required 20 | language: generic 21 | 22 | allow_failures: 23 | - python: "3.6-dev" 24 | - python: "3.7-dev" 25 | - python: "nightly" 26 | - os: "osx" 27 | addons: 28 | apt: 29 | packages: 30 | - git 31 | - pandoc 32 | before_install: | 33 | if [[ $TRAVIS_OS_NAME == 'osx' ]]; then 34 | brew update; 35 | brew install python3 pandoc; 36 | python3 -m venv venv; 37 | source venv/bin/activate; 38 | pip install . test 39 | fi 40 | # command to install dependencies 41 | install: 42 | - "pip install --upgrade pip" # upgrade to latest pip (needed on py3.4) 43 | - "pip install -r requirements-test.txt" 44 | # command to run tests 45 | script: "py.test --cov=git_repo --cov-report term-missing tests" 46 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.md 2 | include VERSION 3 | include LICENSE 4 | include requirements.txt 5 | 6 | global-exclude __pycache__ *.pyc 7 | -------------------------------------------------------------------------------- /git_repo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyzmo/git-repo/2974c3f52bc64fa8a467ac2b0e9a485ba7ed333b/git_repo/__init__.py -------------------------------------------------------------------------------- /git_repo/exceptions.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | class ArgumentError(ValueError): 4 | pass 5 | 6 | class ResourceError(Exception): 7 | pass 8 | 9 | class ResourcePermissionError(PermissionError): 10 | pass 11 | 12 | class ResourceNotFoundError(FileNotFoundError): 13 | pass 14 | 15 | class ResourceExistsError(FileExistsError): 16 | pass 17 | 18 | -------------------------------------------------------------------------------- /git_repo/extract_config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import git 6 | 7 | def extract_gitrepo_sections(conf): 8 | return filter(lambda k: k.startswith('gitrepo'), conf.sections()) 9 | 10 | def extract_gitrepo_conf(gconf_old, gconf_new): 11 | if os.path.exists(gconf_new): 12 | return "✗ cannot execute, file already exists: {}".format(gconf_new) 13 | with git.config.GitConfigParser(gconf_old, read_only=False) as cold: 14 | with git.config.GitConfigParser(gconf_new, read_only=False) as cnew: 15 | sections = list(extract_gitrepo_sections(cold)) 16 | # copy the sections to the new configuration file 17 | cnew.update({s: {k:v for k,v in cold.items(s)} for s in sections}) 18 | cnew.write() 19 | # remove the sections from the old configuration file 20 | for section in sections: 21 | cold.remove_section(section) 22 | # insert path to the new config file in the old one 23 | cold.update({'include': {'path': os.path.abspath(gconf_new)}}) 24 | print("🍻 git-repo configuration extracted to new file: {}".format(gconf_new)) 25 | 26 | if __name__ == '__main__': 27 | if sys.version_info < (3, ): 28 | sys.exit('Please use with python version 3') 29 | if '-h' in sys.argv or '--help' in sys.argv: 30 | sys.exit('Usage: {} [.gitconfig-repos] [.gitconfig]'.format(sys.argv[0])) 31 | sys.exit(extract_gitrepo_conf( 32 | gconf_old=os.path.expanduser(len(sys.argv) >= 3 and sys.argv[2] or '~/.gitconfig'), 33 | gconf_new=os.path.expanduser(len(sys.argv) >= 2 and sys.argv[1] or '~/.gitconfig-repos') 34 | )) 35 | 36 | 37 | -------------------------------------------------------------------------------- /git_repo/kwargparse.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import logging 4 | log = logging.getLogger('git_repo.kwargparse') 5 | 6 | class KeywordArgumentParser: 7 | ''' 8 | Argument parser tailored for use with docopt: 9 | 10 | Will parse all arguments returned by docopt, and will store them as instance 11 | attributes. Then it will launch actions based on the keyword argument list. 12 | 13 | * Parameter arguments (starting with -- or within <>) will automagically be 14 | parsed, dashes will be converted to underscores and stored as attributes of 15 | the parser instance. 16 | * Though if a parameter is matching a method decorated with "store_parameter", 17 | it won't be automagically setup, but will use that method instead. 18 | 19 | Then the keywords used as arguments of the program will be used to call an 20 | "action" method, which have been decorated with "register_action". 21 | 22 | ''' 23 | _action_dict = dict() 24 | _parameter_dict = dict() 25 | 26 | def __init__(self, args): 27 | ''' 28 | Stores the docopt args as class member 29 | ''' 30 | self.args = args 31 | 32 | def init(self): 33 | ''' 34 | method to be defined for anything that needs to be done before launching 35 | the parser. 36 | ''' 37 | pass 38 | 39 | def run(self): 40 | ''' 41 | This method iterates over the docopt's arguments and matches them against 42 | the parameters list. All leftover values are used to resolve the action to 43 | run, and it will run the action, or run the fallback() method if no action 44 | is found. 45 | ''' 46 | self.init() 47 | 48 | args = [] 49 | missed = [] 50 | 51 | # go through setters 52 | for arg, value in self.args.items(): 53 | if arg in self._parameter_dict: 54 | self._parameter_dict[arg](self, value) 55 | #log.debug('calling setter: {} → {}'.format(arg, value)) 56 | elif arg.startswith('--') or arg.startswith('<'): 57 | arg_renamed = arg.lstrip('-<').rstrip('>').replace('-', '_') 58 | if not hasattr(self, arg_renamed): 59 | setattr(self, arg_renamed, value) 60 | #log.debug('auto-setting: self.{} → {}'.format(arg_renamed, value)) 61 | else: 62 | #log.debug('keeping: {} → {}'.format(arg, value)) 63 | if self.args[arg]: 64 | args.append(arg) 65 | 66 | if frozenset(args) in self._action_dict: 67 | #log.debug('running action: {}'.format(self._action_dict[frozenset(args)])) 68 | return self._action_dict[frozenset(args)](self) 69 | else: 70 | return self.fallback() 71 | 72 | def fallback(self): 73 | log.error('Unknown action.') 74 | log.error('Please consult help page (--help).') 75 | return 1 76 | 77 | 78 | 79 | def store_parameter(parameter): 80 | ''' 81 | Decorator for a parameter, use the full length parameter name as specified in the 82 | docopt configuration, like '--verbose' 83 | ''' 84 | def decorator(fun): 85 | KeywordArgumentParser._parameter_dict[parameter] = fun 86 | return fun 87 | return decorator 88 | 89 | def register_action(*args, **kwarg): 90 | ''' 91 | Decorator for an action, the arguments order is not relevant, but it's best 92 | to use the same order as in the docopt for clarity. 93 | ''' 94 | def decorator(fun): 95 | KeywordArgumentParser._action_dict[frozenset(args)] = fun 96 | return fun 97 | return decorator 98 | -------------------------------------------------------------------------------- /git_repo/services/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | -------------------------------------------------------------------------------- /git_repo/services/ext/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os, pkgutil 4 | 5 | __all__ = list(module for _, module, _ in pkgutil.iter_modules([os.path.split(__file__)[0]])) 6 | 7 | -------------------------------------------------------------------------------- /git_repo/services/ext/gitbucket.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import logging 4 | log = logging.getLogger('git_repo.gitbucket') 5 | 6 | from ..service import register_target 7 | from .github import GithubService 8 | from ...exceptions import ArgumentError 9 | 10 | import github3 11 | 12 | @register_target('bucket', 'gitbucket') 13 | class GitbucketService(GithubService): 14 | fqdn = "localhost" 15 | port = 8080 16 | 17 | def __init__(self, *args, **kwarg): 18 | super(GitbucketService, self).__init__(*args, **kwarg) 19 | 20 | @classmethod 21 | def get_auth_token(cls, login, password, prompt=None): 22 | print("Please open the following URL: {}/{}/_application".format(cls.build_url(cls), login)) 23 | print("Generate a new token, and paste it at the following prompt.") 24 | return prompt('token> ') 25 | 26 | def format_path(self, repository, namespace=None, rw=False): 27 | repo = repository 28 | if namespace: 29 | repo = '{}/{}'.format(namespace, repository) 30 | 31 | if not rw and '/' in repo: 32 | return '{}/git/{}.git'.format(self.url_ro, repo) 33 | elif rw and '/' in repo: 34 | if 'ssh://' in self.url_rw: 35 | return '{}/{}.git'.format(self.url_rw, repo) 36 | else: 37 | return '{}:{}.git'.format(self.url_rw, repo) 38 | else: 39 | raise ArgumentError("Cannot tell how to handle this url: `{}/{}`!".format(namespace, repo)) 40 | 41 | def delete(self, repo, user=None): 42 | raise NotImplementedError("GitBucket doesn't suport this action now.") 43 | 44 | def request_create(self, user, repo, from_branch, onto_branch, title=None, description=None, auto_slug=False, edit=None): 45 | raise NotImplementedError("GitBucket doesn't support this action now.") 46 | 47 | def gist_list(self, gist=None): 48 | raise NotImplementedError("GitBucket doesn't support manipulate gist by API.") 49 | 50 | def gist_fetch(self, gist, fname=None): 51 | raise NotImplementedError("GitBucket doesn't support manipulate gist by API.") 52 | 53 | def gist_clone(self, gist): 54 | raise NotImplementedError("GitBucket doesn't support manipulate gist by API.") 55 | 56 | def gist_create(self, gist_pathes, description, secret=False): 57 | raise NotImplementedError("GitBucket doesn't support manipulate gist by API.") 58 | 59 | def gist_delete(self, gist_id): 60 | raise NotImplementedError("GitBucket doesn't support manipulate gist by API.") 61 | -------------------------------------------------------------------------------- /git_repo/tools.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import shutil 5 | 6 | def print_tty(*args, **kwarg): 7 | if sys.stdout.isatty(): 8 | print(*args, **kwarg) 9 | 10 | def print_iter(generator): 11 | fmt = next(generator) 12 | print_tty(fmt.format(*next(generator))) 13 | for item in generator: 14 | print(fmt.format(*item)) 15 | 16 | def loop_input(*args, method=input, **kwarg): 17 | out = '' 18 | while len(out) == 0: 19 | out = method(*args, **kwarg) 20 | return out 21 | 22 | def confirm(what, where): 23 | ''' 24 | Method to show a CLI based confirmation message, waiting for a yes/no answer. 25 | "what" and "where" are used to better define the message. 26 | ''' 27 | ans = input('Are you sure you want to delete the ' 28 | '{} {} from the service?\n[yN]> '.format(what, where)) 29 | if 'y' in ans: 30 | ans = loop_input('Are you really sure? there\'s no coming back!\n' 31 | '[type \'burn!\' to proceed]> ') 32 | if 'burn!' != ans: 33 | return False 34 | else: 35 | return False 36 | return True 37 | 38 | def columnize(lines, indent=0, pad=2): 39 | term_width = shutil.get_terminal_size((80, 20)).columns 40 | # prints a list of items in a fashion similar to the dir command 41 | # borrowed from https://gist.github.com/critiqjo/2ca84db26daaeb1715e1 42 | n_lines = len(lines) 43 | if n_lines == 0: 44 | return 45 | col_width = max(len(line) for line in lines) 46 | n_cols = int((term_width + pad - indent)/(col_width + pad)) 47 | n_cols = min(n_lines, max(1, n_cols)) 48 | col_len = int(n_lines/n_cols) + (0 if n_lines % n_cols == 0 else 1) 49 | if (n_cols - 1) * col_len >= n_lines: 50 | n_cols -= 1 51 | cols = [lines[i*col_len : i*col_len + col_len] for i in range(n_cols)] 52 | rows = list(zip(*cols)) 53 | rows_missed = zip(*[col[len(rows):] for col in cols[:-1]]) 54 | rows.extend(rows_missed) 55 | for row in rows: 56 | yield [" "*indent + (" "*pad).join(line.ljust(col_width) for line in row)] 57 | -------------------------------------------------------------------------------- /requirements-test.txt: -------------------------------------------------------------------------------- 1 | -r requirements.txt 2 | -e . 3 | pytest 4 | pytest-cov 5 | pytest-sugar 6 | pytest-catchlog 7 | pytest-datadir-ng 8 | testfixtures 9 | mock 10 | betamax==0.5.1 11 | betamax-serializers 12 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | docopt 2 | progress 3 | python-dateutil 4 | lxml 5 | GitPython>=2.1.0 6 | github3.py<1.0.0 7 | python-gitlab>=1.0.0 8 | gogs-client>=1.0.3 9 | pybitbucket_fork>=0.12.2 10 | python-gerritclient>=0.0.1dev137 11 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | -------------------------------------------------------------------------------- /tests/integration/cassettes/test_bitbucket_test_05_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-24T13:32:13", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Z3V5em1vOkpKNHRsNHNzMTRuLmMwbQ==", 14 | "Connection": "keep-alive", 15 | "From": "z+git-repo+pub@m0g.net", 16 | "User-Agent": "pybitbucket/0.11.2 python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://api.bitbucket.org/2.0/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": "{\"username\": \"\", \"website\": \"http://i.got.nothing.to/blog\", \"display_name\": \"Guyzmo\", \"uuid\": \"{abf29c83-e77e-4c9a-b5c7-38db801ef79e}\", \"links\": {\"hooks\": {\"href\": \"https://api.bitbucket.org/2.0/users//hooks\"}, \"self\": {\"href\": \"https://api.bitbucket.org/2.0/users/\"}, \"repositories\": {\"href\": \"https://api.bitbucket.org/2.0/repositories/\"}, \"html\": {\"href\": \"https://bitbucket.org//\"}, \"followers\": {\"href\": \"https://api.bitbucket.org/2.0/users//followers\"}, \"avatar\": {\"href\": \"https://bitbucket.org/account//avatar/32/\"}, \"following\": {\"href\": \"https://api.bitbucket.org/2.0/users//following\"}, \"snippets\": {\"href\": \"https://api.bitbucket.org/2.0/snippets/\"}}, \"created_on\": \"2008-09-20T15:08:53.695316+00:00\", \"location\": null, \"type\": \"user\"}" 25 | }, 26 | "headers": { 27 | "Connection": "keep-alive", 28 | "Content-Length": "801", 29 | "Content-Type": "application/json; charset=utf-8", 30 | "Date": "Sat, 24 Dec 2016 13:32:13 GMT", 31 | "ETag": "\"321b3bdea810843db96c90951905a5e3\"", 32 | "Server": "nginx", 33 | "Strict-Transport-Security": "max-age=31536000", 34 | "Vary": "Authorization", 35 | "X-Accepted-OAuth-Scopes": "account", 36 | "X-Content-Type-Options": "nosniff", 37 | "X-Frame-Options": "SAMEORIGIN", 38 | "X-Render-Time": "0.020112991333", 39 | "X-Request-Count": "678", 40 | "X-Served-By": "app-139", 41 | "X-Static-Version": "e72177d765d6", 42 | "X-Version": "e72177d765d6" 43 | }, 44 | "status": { 45 | "code": 200, 46 | "message": "OK" 47 | }, 48 | "url": "https://api.bitbucket.org/2.0/user" 49 | } 50 | } 51 | ], 52 | "recorded_with": "betamax/0.5.1" 53 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_bitbucket_test_06_add__name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-24T13:32:30", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Z3V5em1vOkpKNHRsNHNzMTRuLmMwbQ==", 14 | "Connection": "keep-alive", 15 | "From": "z+git-repo+pub@m0g.net", 16 | "User-Agent": "pybitbucket/0.11.2 python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://api.bitbucket.org/2.0/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": "{\"username\": \"\", \"website\": \"http://i.got.nothing.to/blog\", \"display_name\": \"Guyzmo\", \"uuid\": \"{abf29c83-e77e-4c9a-b5c7-38db801ef79e}\", \"links\": {\"hooks\": {\"href\": \"https://api.bitbucket.org/2.0/users//hooks\"}, \"self\": {\"href\": \"https://api.bitbucket.org/2.0/users/\"}, \"repositories\": {\"href\": \"https://api.bitbucket.org/2.0/repositories/\"}, \"html\": {\"href\": \"https://bitbucket.org//\"}, \"followers\": {\"href\": \"https://api.bitbucket.org/2.0/users//followers\"}, \"avatar\": {\"href\": \"https://bitbucket.org/account//avatar/32/\"}, \"following\": {\"href\": \"https://api.bitbucket.org/2.0/users//following\"}, \"snippets\": {\"href\": \"https://api.bitbucket.org/2.0/snippets/\"}}, \"created_on\": \"2008-09-20T15:08:53.695316+00:00\", \"location\": null, \"type\": \"user\"}" 25 | }, 26 | "headers": { 27 | "Connection": "keep-alive", 28 | "Content-Length": "801", 29 | "Content-Type": "application/json; charset=utf-8", 30 | "Date": "Sat, 24 Dec 2016 13:32:30 GMT", 31 | "ETag": "\"321b3bdea810843db96c90951905a5e3\"", 32 | "Server": "nginx", 33 | "Strict-Transport-Security": "max-age=31536000", 34 | "Vary": "Authorization", 35 | "X-Accepted-OAuth-Scopes": "account", 36 | "X-Content-Type-Options": "nosniff", 37 | "X-Frame-Options": "SAMEORIGIN", 38 | "X-Render-Time": "0.0180549621582", 39 | "X-Request-Count": "89", 40 | "X-Served-By": "app-143", 41 | "X-Static-Version": "e72177d765d6", 42 | "X-Version": "e72177d765d6" 43 | }, 44 | "status": { 45 | "code": 200, 46 | "message": "OK" 47 | }, 48 | "url": "https://api.bitbucket.org/2.0/user" 49 | } 50 | } 51 | ], 52 | "recorded_with": "betamax/0.5.1" 53 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_bitbucket_test_07_add__alone.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-24T13:34:09", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Z3V5em1vOkpKNHRsNHNzMTRuLmMwbQ==", 14 | "Connection": "keep-alive", 15 | "From": "z+git-repo+pub@m0g.net", 16 | "User-Agent": "pybitbucket/0.11.2 python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://api.bitbucket.org/2.0/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": "{\"username\": \"\", \"website\": \"http://i.got.nothing.to/blog\", \"display_name\": \"Guyzmo\", \"uuid\": \"{abf29c83-e77e-4c9a-b5c7-38db801ef79e}\", \"links\": {\"hooks\": {\"href\": \"https://api.bitbucket.org/2.0/users//hooks\"}, \"self\": {\"href\": \"https://api.bitbucket.org/2.0/users/\"}, \"repositories\": {\"href\": \"https://api.bitbucket.org/2.0/repositories/\"}, \"html\": {\"href\": \"https://bitbucket.org//\"}, \"followers\": {\"href\": \"https://api.bitbucket.org/2.0/users//followers\"}, \"avatar\": {\"href\": \"https://bitbucket.org/account//avatar/32/\"}, \"following\": {\"href\": \"https://api.bitbucket.org/2.0/users//following\"}, \"snippets\": {\"href\": \"https://api.bitbucket.org/2.0/snippets/\"}}, \"created_on\": \"2008-09-20T15:08:53.695316+00:00\", \"location\": null, \"type\": \"user\"}" 25 | }, 26 | "headers": { 27 | "Connection": "keep-alive", 28 | "Content-Length": "801", 29 | "Content-Type": "application/json; charset=utf-8", 30 | "Date": "Sat, 24 Dec 2016 13:34:09 GMT", 31 | "ETag": "\"321b3bdea810843db96c90951905a5e3\"", 32 | "Server": "nginx", 33 | "Strict-Transport-Security": "max-age=31536000", 34 | "Vary": "Authorization", 35 | "X-Accepted-OAuth-Scopes": "account", 36 | "X-Content-Type-Options": "nosniff", 37 | "X-Frame-Options": "SAMEORIGIN", 38 | "X-Render-Time": "0.0236461162567", 39 | "X-Request-Count": "425", 40 | "X-Served-By": "app-143", 41 | "X-Static-Version": "e72177d765d6", 42 | "X-Version": "e72177d765d6" 43 | }, 44 | "status": { 45 | "code": 200, 46 | "message": "OK" 47 | }, 48 | "url": "https://api.bitbucket.org/2.0/user" 49 | } 50 | } 51 | ], 52 | "recorded_with": "betamax/0.5.1" 53 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_bitbucket_test_08_add__alone_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-24T13:34:18", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Z3V5em1vOkpKNHRsNHNzMTRuLmMwbQ==", 14 | "Connection": "keep-alive", 15 | "From": "z+git-repo+pub@m0g.net", 16 | "User-Agent": "pybitbucket/0.11.2 python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://api.bitbucket.org/2.0/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": "{\"username\": \"\", \"website\": \"http://i.got.nothing.to/blog\", \"display_name\": \"Guyzmo\", \"uuid\": \"{abf29c83-e77e-4c9a-b5c7-38db801ef79e}\", \"links\": {\"hooks\": {\"href\": \"https://api.bitbucket.org/2.0/users//hooks\"}, \"self\": {\"href\": \"https://api.bitbucket.org/2.0/users/\"}, \"repositories\": {\"href\": \"https://api.bitbucket.org/2.0/repositories/\"}, \"html\": {\"href\": \"https://bitbucket.org//\"}, \"followers\": {\"href\": \"https://api.bitbucket.org/2.0/users//followers\"}, \"avatar\": {\"href\": \"https://bitbucket.org/account//avatar/32/\"}, \"following\": {\"href\": \"https://api.bitbucket.org/2.0/users//following\"}, \"snippets\": {\"href\": \"https://api.bitbucket.org/2.0/snippets/\"}}, \"created_on\": \"2008-09-20T15:08:53.695316+00:00\", \"location\": null, \"type\": \"user\"}" 25 | }, 26 | "headers": { 27 | "Connection": "keep-alive", 28 | "Content-Length": "801", 29 | "Content-Type": "application/json; charset=utf-8", 30 | "Date": "Sat, 24 Dec 2016 13:34:18 GMT", 31 | "ETag": "\"321b3bdea810843db96c90951905a5e3\"", 32 | "Server": "nginx", 33 | "Strict-Transport-Security": "max-age=31536000", 34 | "Vary": "Authorization", 35 | "X-Accepted-OAuth-Scopes": "account", 36 | "X-Content-Type-Options": "nosniff", 37 | "X-Frame-Options": "SAMEORIGIN", 38 | "X-Render-Time": "0.0193259716034", 39 | "X-Request-Count": "53", 40 | "X-Served-By": "app-143", 41 | "X-Static-Version": "e72177d765d6", 42 | "X-Version": "e72177d765d6" 43 | }, 44 | "status": { 45 | "code": 200, 46 | "message": "OK" 47 | }, 48 | "url": "https://api.bitbucket.org/2.0/user" 49 | } 50 | } 51 | ], 52 | "recorded_with": "betamax/0.5.1" 53 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_bitbucket_test_09_add__default.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-24T13:34:27", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Z3V5em1vOkpKNHRsNHNzMTRuLmMwbQ==", 14 | "Connection": "keep-alive", 15 | "From": "z+git-repo+pub@m0g.net", 16 | "User-Agent": "pybitbucket/0.11.2 python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://api.bitbucket.org/2.0/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": "{\"username\": \"\", \"website\": \"http://i.got.nothing.to/blog\", \"display_name\": \"Guyzmo\", \"uuid\": \"{abf29c83-e77e-4c9a-b5c7-38db801ef79e}\", \"links\": {\"hooks\": {\"href\": \"https://api.bitbucket.org/2.0/users//hooks\"}, \"self\": {\"href\": \"https://api.bitbucket.org/2.0/users/\"}, \"repositories\": {\"href\": \"https://api.bitbucket.org/2.0/repositories/\"}, \"html\": {\"href\": \"https://bitbucket.org//\"}, \"followers\": {\"href\": \"https://api.bitbucket.org/2.0/users//followers\"}, \"avatar\": {\"href\": \"https://bitbucket.org/account//avatar/32/\"}, \"following\": {\"href\": \"https://api.bitbucket.org/2.0/users//following\"}, \"snippets\": {\"href\": \"https://api.bitbucket.org/2.0/snippets/\"}}, \"created_on\": \"2008-09-20T15:08:53.695316+00:00\", \"location\": null, \"type\": \"user\"}" 25 | }, 26 | "headers": { 27 | "Connection": "keep-alive", 28 | "Content-Length": "801", 29 | "Content-Type": "application/json; charset=utf-8", 30 | "Date": "Sat, 24 Dec 2016 13:34:27 GMT", 31 | "ETag": "\"321b3bdea810843db96c90951905a5e3\"", 32 | "Server": "nginx", 33 | "Strict-Transport-Security": "max-age=31536000", 34 | "Vary": "Authorization", 35 | "X-Accepted-OAuth-Scopes": "account", 36 | "X-Content-Type-Options": "nosniff", 37 | "X-Frame-Options": "SAMEORIGIN", 38 | "X-Render-Time": "0.0201468467712", 39 | "X-Request-Count": "566", 40 | "X-Served-By": "app-142", 41 | "X-Static-Version": "e72177d765d6", 42 | "X-Version": "e72177d765d6" 43 | }, 44 | "status": { 45 | "code": 200, 46 | "message": "OK" 47 | }, 48 | "url": "https://api.bitbucket.org/2.0/user" 49 | } 50 | } 51 | ], 52 | "recorded_with": "betamax/0.5.1" 53 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_bitbucket_test_10_add__default_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-24T13:34:36", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Z3V5em1vOkpKNHRsNHNzMTRuLmMwbQ==", 14 | "Connection": "keep-alive", 15 | "From": "z+git-repo+pub@m0g.net", 16 | "User-Agent": "pybitbucket/0.11.2 python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://api.bitbucket.org/2.0/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": "{\"username\": \"\", \"website\": \"http://i.got.nothing.to/blog\", \"display_name\": \"Guyzmo\", \"uuid\": \"{abf29c83-e77e-4c9a-b5c7-38db801ef79e}\", \"links\": {\"hooks\": {\"href\": \"https://api.bitbucket.org/2.0/users//hooks\"}, \"self\": {\"href\": \"https://api.bitbucket.org/2.0/users/\"}, \"repositories\": {\"href\": \"https://api.bitbucket.org/2.0/repositories/\"}, \"html\": {\"href\": \"https://bitbucket.org//\"}, \"followers\": {\"href\": \"https://api.bitbucket.org/2.0/users//followers\"}, \"avatar\": {\"href\": \"https://bitbucket.org/account//avatar/32/\"}, \"following\": {\"href\": \"https://api.bitbucket.org/2.0/users//following\"}, \"snippets\": {\"href\": \"https://api.bitbucket.org/2.0/snippets/\"}}, \"created_on\": \"2008-09-20T15:08:53.695316+00:00\", \"location\": null, \"type\": \"user\"}" 25 | }, 26 | "headers": { 27 | "Connection": "keep-alive", 28 | "Content-Length": "801", 29 | "Content-Type": "application/json; charset=utf-8", 30 | "Date": "Sat, 24 Dec 2016 13:34:36 GMT", 31 | "ETag": "\"321b3bdea810843db96c90951905a5e3\"", 32 | "Server": "nginx", 33 | "Strict-Transport-Security": "max-age=31536000", 34 | "Vary": "Authorization", 35 | "X-Accepted-OAuth-Scopes": "account", 36 | "X-Content-Type-Options": "nosniff", 37 | "X-Frame-Options": "SAMEORIGIN", 38 | "X-Render-Time": "0.0192201137543", 39 | "X-Request-Count": "337", 40 | "X-Served-By": "app-140", 41 | "X-Static-Version": "e72177d765d6", 42 | "X-Version": "e72177d765d6" 43 | }, 44 | "status": { 45 | "code": 200, 46 | "message": "OK" 47 | }, 48 | "url": "https://api.bitbucket.org/2.0/user" 49 | } 50 | } 51 | ], 52 | "recorded_with": "betamax/0.5.1" 53 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_bitbucket_test_11_add__alone_default.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-24T13:36:45", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Z3V5em1vOkpKNHRsNHNzMTRuLmMwbQ==", 14 | "Connection": "keep-alive", 15 | "From": "z+git-repo+pub@m0g.net", 16 | "User-Agent": "pybitbucket/0.11.2 python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://api.bitbucket.org/2.0/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": "{\"username\": \"\", \"website\": \"http://i.got.nothing.to/blog\", \"display_name\": \"Guyzmo\", \"uuid\": \"{abf29c83-e77e-4c9a-b5c7-38db801ef79e}\", \"links\": {\"hooks\": {\"href\": \"https://api.bitbucket.org/2.0/users//hooks\"}, \"self\": {\"href\": \"https://api.bitbucket.org/2.0/users/\"}, \"repositories\": {\"href\": \"https://api.bitbucket.org/2.0/repositories/\"}, \"html\": {\"href\": \"https://bitbucket.org//\"}, \"followers\": {\"href\": \"https://api.bitbucket.org/2.0/users//followers\"}, \"avatar\": {\"href\": \"https://bitbucket.org/account//avatar/32/\"}, \"following\": {\"href\": \"https://api.bitbucket.org/2.0/users//following\"}, \"snippets\": {\"href\": \"https://api.bitbucket.org/2.0/snippets/\"}}, \"created_on\": \"2008-09-20T15:08:53.695316+00:00\", \"location\": null, \"type\": \"user\"}" 25 | }, 26 | "headers": { 27 | "Connection": "keep-alive", 28 | "Content-Length": "801", 29 | "Content-Type": "application/json; charset=utf-8", 30 | "Date": "Sat, 24 Dec 2016 13:36:45 GMT", 31 | "ETag": "\"321b3bdea810843db96c90951905a5e3\"", 32 | "Server": "nginx", 33 | "Strict-Transport-Security": "max-age=31536000", 34 | "Vary": "Authorization", 35 | "X-Accepted-OAuth-Scopes": "account", 36 | "X-Content-Type-Options": "nosniff", 37 | "X-Frame-Options": "SAMEORIGIN", 38 | "X-Render-Time": "0.0206501483917", 39 | "X-Request-Count": "121", 40 | "X-Served-By": "app-142", 41 | "X-Static-Version": "e72177d765d6", 42 | "X-Version": "e72177d765d6" 43 | }, 44 | "status": { 45 | "code": 200, 46 | "message": "OK" 47 | }, 48 | "url": "https://api.bitbucket.org/2.0/user" 49 | } 50 | } 51 | ], 52 | "recorded_with": "betamax/0.5.1" 53 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_bitbucket_test_12_add__alone_default_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-24T13:36:46", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Z3V5em1vOkpKNHRsNHNzMTRuLmMwbQ==", 14 | "Connection": "keep-alive", 15 | "From": "z+git-repo+pub@m0g.net", 16 | "User-Agent": "pybitbucket/0.11.2 python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://api.bitbucket.org/2.0/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": "{\"username\": \"\", \"website\": \"http://i.got.nothing.to/blog\", \"display_name\": \"Guyzmo\", \"uuid\": \"{abf29c83-e77e-4c9a-b5c7-38db801ef79e}\", \"links\": {\"hooks\": {\"href\": \"https://api.bitbucket.org/2.0/users//hooks\"}, \"self\": {\"href\": \"https://api.bitbucket.org/2.0/users/\"}, \"repositories\": {\"href\": \"https://api.bitbucket.org/2.0/repositories/\"}, \"html\": {\"href\": \"https://bitbucket.org//\"}, \"followers\": {\"href\": \"https://api.bitbucket.org/2.0/users//followers\"}, \"avatar\": {\"href\": \"https://bitbucket.org/account//avatar/32/\"}, \"following\": {\"href\": \"https://api.bitbucket.org/2.0/users//following\"}, \"snippets\": {\"href\": \"https://api.bitbucket.org/2.0/snippets/\"}}, \"created_on\": \"2008-09-20T15:08:53.695316+00:00\", \"location\": null, \"type\": \"user\"}" 25 | }, 26 | "headers": { 27 | "Connection": "keep-alive", 28 | "Content-Length": "801", 29 | "Content-Type": "application/json; charset=utf-8", 30 | "Date": "Sat, 24 Dec 2016 13:36:46 GMT", 31 | "ETag": "\"321b3bdea810843db96c90951905a5e3\"", 32 | "Server": "nginx", 33 | "Strict-Transport-Security": "max-age=31536000", 34 | "Vary": "Authorization", 35 | "X-Accepted-OAuth-Scopes": "account", 36 | "X-Content-Type-Options": "nosniff", 37 | "X-Frame-Options": "SAMEORIGIN", 38 | "X-Render-Time": "0.0195748806", 39 | "X-Request-Count": "548", 40 | "X-Served-By": "app-141", 41 | "X-Static-Version": "e72177d765d6", 42 | "X-Version": "e72177d765d6" 43 | }, 44 | "status": { 45 | "code": 200, 46 | "message": "OK" 47 | }, 48 | "url": "https://api.bitbucket.org/2.0/user" 49 | } 50 | } 51 | ], 52 | "recorded_with": "betamax/0.5.1" 53 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_bitbucket_test_29_snippet_create_snippet__file_not_exist.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-28T22:18:47", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Z3V5em1vOlF0WmpzZVFMaGE4NFBMZnRwaGJF", 14 | "Connection": "keep-alive", 15 | "From": "z+git-repo+pub@m0g.net", 16 | "User-Agent": "pybitbucket/0.12.0 python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://api.bitbucket.org/2.0/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": "{\"username\": \"guyzmo\", \"website\": \"http://i.got.nothing.to/blog\", \"display_name\": \"Guyzmo\", \"uuid\": \"{abf29c83-e77e-4c9a-b5c7-38db801ef79e}\", \"links\": {\"hooks\": {\"href\": \"https://api.bitbucket.org/2.0/users/guyzmo/hooks\"}, \"self\": {\"href\": \"https://api.bitbucket.org/2.0/users/guyzmo\"}, \"repositories\": {\"href\": \"https://api.bitbucket.org/2.0/repositories/guyzmo\"}, \"html\": {\"href\": \"https://bitbucket.org/guyzmo/\"}, \"followers\": {\"href\": \"https://api.bitbucket.org/2.0/users/guyzmo/followers\"}, \"avatar\": {\"href\": \"https://bitbucket.org/account/guyzmo/avatar/32/\"}, \"following\": {\"href\": \"https://api.bitbucket.org/2.0/users/guyzmo/following\"}, \"snippets\": {\"href\": \"https://api.bitbucket.org/2.0/snippets/guyzmo\"}}, \"created_on\": \"2008-09-20T15:08:53.695316+00:00\", \"location\": null, \"type\": \"user\"}" 25 | }, 26 | "headers": { 27 | "Connection": "keep-alive", 28 | "Content-Length": "801", 29 | "Content-Type": "application/json; charset=utf-8", 30 | "Date": "Wed, 28 Dec 2016 22:18:47 GMT", 31 | "ETag": "\"321b3bdea810843db96c90951905a5e3\"", 32 | "Server": "nginx", 33 | "Strict-Transport-Security": "max-age=31536000", 34 | "Vary": "Authorization", 35 | "X-Accepted-OAuth-Scopes": "account", 36 | "X-Content-Type-Options": "nosniff", 37 | "X-Frame-Options": "SAMEORIGIN", 38 | "X-OAuth-Scopes": "snippet:write, snippet, repository:delete, repository:admin, pullrequest:write, repository, project:write, project, team, account", 39 | "X-Render-Time": "0.0347020626068", 40 | "X-Request-Count": "411", 41 | "X-Served-By": "app-142", 42 | "X-Static-Version": "e72177d765d6", 43 | "X-Version": "e72177d765d6" 44 | }, 45 | "status": { 46 | "code": 200, 47 | "message": "OK" 48 | }, 49 | "url": "https://api.bitbucket.org/2.0/user" 50 | } 51 | } 52 | ], 53 | "recorded_with": "betamax/0.5.1" 54 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gerrithub_test_01_review.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-12-15T14:57:54", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic UGhhbnRvbS00MjovRk45NTI2TE84MkxYTXJucWJUNWE3Y25wSkY4b2hVTVFRQ1l6TkgzTVE=", 14 | "Connection": "keep-alive", 15 | "Content-Type": "application/json", 16 | "User-Agent": "python-requests/2.18.2" 17 | }, 18 | "method": "GET", 19 | "uri": "https://review.gerrithub.io/a/config/server/version" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": ")]}'\n\"2.13.6-3044-g7e9c06d\"\n" 25 | }, 26 | "headers": { 27 | "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate", 28 | "Connection": "close", 29 | "Content-Disposition": "attachment", 30 | "Content-Length": "28", 31 | "Content-Type": "application/json;charset=utf-8", 32 | "Date": "Fri, 15 Dec 2017 14:57:54 GMT", 33 | "Expires": "Mon, 01 Jan 1990 00:00:00 GMT", 34 | "Pragma": "no-cache", 35 | "Server": "Apache/2.4.6 (CentOS)", 36 | "Set-Cookie": "JSESSIONID=11nhmra540f822wlpl1srbr9s;Path=/;Secure", 37 | "X-Content-Type-Options": "nosniff" 38 | }, 39 | "status": { 40 | "code": 200, 41 | "message": "OK" 42 | }, 43 | "url": "https://review.gerrithub.io/a/config/server/version" 44 | } 45 | } 46 | ], 47 | "recorded_with": "betamax/0.5.1" 48 | } 49 | -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gerrithub_test_07_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-12-20T10:53:16", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/json", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic UGhhbnRvbS00MjovRk45NTI2TE84MkxYTXJucWJUNWE3Y25wSkY4b2hVTVFRQ1l6TkgzTVE=", 14 | "Connection": "keep-alive", 15 | "Content-Type": "application/json", 16 | "User-Agent": "python-requests/2.10.0" 17 | }, 18 | "method": "GET", 19 | "uri": "https://review.gerrithub.io/a/config/server/version" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": "utf-8", 24 | "string": ")]}'\n\"2.13.6-3044-g7e9c06d\"\n" 25 | }, 26 | "headers": { 27 | "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate", 28 | "Connection": "close", 29 | "Content-Disposition": "attachment", 30 | "Content-Length": "28", 31 | "Content-Type": "application/json;charset=utf-8", 32 | "Date": "Wed, 20 Dec 2017 10:53:16 GMT", 33 | "Expires": "Mon, 01 Jan 1990 00:00:00 GMT", 34 | "Pragma": "no-cache", 35 | "Server": "Apache/2.4.6 (CentOS)", 36 | "Set-Cookie": "JSESSIONID=6xcvc7y9h7azpva4xnrxa0cv;Path=/;Secure", 37 | "X-Content-Type-Options": "nosniff" 38 | }, 39 | "status": { 40 | "code": 200, 41 | "message": "OK" 42 | }, 43 | "url": "https://review.gerrithub.io/a/config/server/version" 44 | } 45 | } 46 | ], 47 | "recorded_with": "betamax/0.5.1" 48 | } 49 | -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_02_delete.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:30", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:30 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1exebz6q2dntt1fxo3txlh9yzx;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_03_delete_nouser.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:30", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:30 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1g702abps6zwe13t5bf4zuxwj4;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_04_clone.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-05-03T22:27:00", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.6" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"git-repo-user\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-05-03T22:25:55Z\",\"url\":\"http://localhost:8080/api/v3/users/git-repo-user\",\"html_url\":\"http://localhost:8080/git-repo-user\",\"avatar_url\":\"http://localhost:8080/git-repo-user/_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Wed, 03 May 2017 22:27:00 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1ljvq76b5ckzqc8s941te392h;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | }, 42 | { 43 | "recorded_at": "2017-05-03T22:27:00", 44 | "request": { 45 | "body": { 46 | "encoding": "utf-8", 47 | "string": "" 48 | }, 49 | "headers": { 50 | "Accept": "application/vnd.github.v3.full+json", 51 | "Accept-Charset": "utf-8", 52 | "Accept-Encoding": "identity", 53 | "Authorization": "token ", 54 | "Connection": "keep-alive", 55 | "Content-Type": "application/json", 56 | "Cookie": "JSESSIONID=1ljvq76b5ckzqc8s941te392h", 57 | "User-Agent": "github3.py/0.9.6" 58 | }, 59 | "method": "GET", 60 | "uri": "http://localhost:8080/api/v3/repos/root/repo" 61 | }, 62 | "response": { 63 | "body": { 64 | "encoding": "utf-8", 65 | "string": "{\"name\":\"repo\",\"full_name\":\"root/repo\",\"description\":\"\",\"watchers\":0,\"forks\":0,\"private\":false,\"default_branch\":\"master\",\"owner\":{\"login\":\"root\",\"email\":\"root@localhost\",\"type\":\"User\",\"site_admin\":true,\"created_at\":\"2017-05-03T22:25:27Z\",\"url\":\"http://localhost:8080/api/v3/users/root\",\"html_url\":\"http://localhost:8080/root\",\"avatar_url\":\"http://localhost:8080/root/_avatar\"},\"forks_count\":0,\"watchers_count\":0,\"url\":\"http://localhost:8080/api/v3/repos/root/repo\",\"http_url\":\"http://localhost:8080/git/root/repo.git\",\"clone_url\":\"http://localhost:8080/git/root/repo.git\",\"html_url\":\"http://localhost:8080/root/repo\"}" 66 | }, 67 | "headers": { 68 | "Content-Length": "617", 69 | "Content-Type": "application/json;charset=utf-8", 70 | "Date": "Wed, 03 May 2017 22:27:00 GMT", 71 | "Server": "Jetty(9.3.z-SNAPSHOT)" 72 | }, 73 | "status": { 74 | "code": 200, 75 | "message": "OK" 76 | }, 77 | "url": "http://localhost:8080/api/v3/repos/root/repo" 78 | } 79 | } 80 | ], 81 | "recorded_with": "betamax/0.5.1" 82 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_04_clone__too_many_slashes.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-08-06T19:14:25", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.6" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "404 page not found\n" 26 | }, 27 | "headers": { 28 | "Content-Length": "19", 29 | "Content-Type": "text/plain; charset=utf-8", 30 | "Date": "Sun, 06 Aug 2017 19:14:25 GMT", 31 | "Set-Cookie": "CSRF-Token-IE7WA=wTj4QAW4PYsgCHSFAKwQGNuoXGa24wQV", 32 | "X-Content-Type-Options": "nosniff", 33 | "X-Syncthing-Id": "IE7WACV-EKPDZPW-7DN3BMO-P3TDKIR-QXNTDSC-JIR4EQS-6S3R5W4-IUQUJAO", 34 | "X-Syncthing-Version": "v0.14.26" 35 | }, 36 | "status": { 37 | "code": 404, 38 | "message": "Not Found" 39 | }, 40 | "url": "http://localhost:8080/api/v3/user" 41 | } 42 | } 43 | ], 44 | "recorded_with": "betamax/0.5.1" 45 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_05_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:31", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:31 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=12fqq4ah6d7rv5zzoig6ip5kz;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_06_add__name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:31", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:31 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=xi2pyzrjgpyz1ekggbnj8jgn1;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_07_add__alone.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:32", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:32 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1i160yq1tpaxc1ob0onmmj0iw5;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_08_add__alone_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:32", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:32 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1j5abn2kogqvt1qlk2sm7efyhk;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_09_add__default.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:33", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:33 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=16txux2n20esxcq0ycl4ibyfy;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_10_add__default_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:33", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:33 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1hqliraoevl171wgt4h7z399tb;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_11_add__alone_default.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:34", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:34 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=17t18c8pftcot13bjwzburvb7l;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_12_add__alone_default_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:34", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:34 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1m9vstsyir60d88al5xcy0t4h;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_13_gist_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:35", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:35 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=19cj7kzolpoz11jfvpg3aftrlb;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_14_gist_list_with_gist.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:35", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:35 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1jszig4mp93y31kykxoqtlm484;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_15_gist_list_with_bad_gist.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:36", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:36 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1wi4fpto9cfsv5tw9ks1hsx4j;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_16_gist_clone_with_gist.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:36", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:36 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1xi71cp1fw2c116p6uod3kcyut;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_17_gist_fetch_with_gist.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:36", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:36 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1gcpynd4mn3xpedqf40o45uz3;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_18_gist_fetch_with_bad_gist.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:37", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:37 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=xfbfqxcodsx1wr5637fl5m3e;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_19_gist_fetch_with_gist_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:37", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:37 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=26n6v4rhipg7ndacpsgvsdup;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_20_gist_fetch_with_bad_gist_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:37", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:37 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=107eb5tuzrg3y5lb1qz8ecwkj;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_21_gist_create_gist_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:38", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:38 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1eo8n83wolqkf111jlwg4o8di;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_22_gist_create_gist_file_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:38", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:38 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=cpr24yfr94sm19vtbt1smehv3;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_23_gist_create_gist_dir.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:39", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:39 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=6r3ac49phphb1dopjgfhmlzxo;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_24_gist_create_gist_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:39", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:39 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=lgjbyilel85bcvicib1nze0b;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_25_gist_create_gist_file_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:39", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:39 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1tlbrlyyzscxymgfq357ruezz;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_26_gist_create_gist_dir.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:40", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:40 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=57ifzntem987y5m8j25y79tj;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_27_gist_delete.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:40", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:40 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1da8sni02eukg17e15zmbn004y;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_28_gist_delete__not_exist.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:41", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:41 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=yr4lxlpbi9rpsjaw1a2qnwzt;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitbucket_test_29_gist_create_gist__file_not_exist.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-04-30T17:42:41", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "http://localhost:8080/api/v3/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"email\":\"user@localhost\",\"type\":\"User\",\"site_admin\":false,\"created_at\":\"2017-04-30T17:39:36Z\",\"url\":\"http://localhost:8080/api/v3/users/\",\"html_url\":\"http://localhost:8080/\",\"avatar_url\":\"http://localhost:8080//_avatar\"}" 26 | }, 27 | "headers": { 28 | "Content-Length": "284", 29 | "Content-Type": "application/json;charset=utf-8", 30 | "Date": "Sun, 30 Apr 2017 17:42:41 GMT", 31 | "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", 32 | "Server": "Jetty(9.3.z-SNAPSHOT)", 33 | "Set-Cookie": "JSESSIONID=1pauj5lksfgqw1054nf81qyr41;Path=/;HttpOnly" 34 | }, 35 | "status": { 36 | "code": 200, 37 | "message": "OK" 38 | }, 39 | "url": "http://localhost:8080/api/v3/user" 40 | } 41 | } 42 | ], 43 | "recorded_with": "betamax/0.5.1" 44 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_05_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T21:01:40", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":69,\"public_gists\":10,\"followers\":43,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Wed, 30 Mar 2016 21:01:53 GMT", 35 | "ETag": "\"031cbfb6e1a055fa6dea52788f2a6582\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:36C9:F0B9F95:56FC3EC1", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4984", 49 | "X-RateLimit-Reset": "1459375302", 50 | "X-Served-By": "b0ef53392caa42315c6206737946d931", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_06_add__name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T21:01:40", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":69,\"public_gists\":10,\"followers\":43,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Wed, 30 Mar 2016 21:01:54 GMT", 35 | "ETag": "\"031cbfb6e1a055fa6dea52788f2a6582\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:2DFF:4AF1022:56FC3EC2", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4983", 49 | "X-RateLimit-Reset": "1459375302", 50 | "X-Served-By": "bae57931a6fe678a3dffe9be8e7819c8", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_07_add__alone.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T21:01:41", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":69,\"public_gists\":10,\"followers\":43,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Wed, 30 Mar 2016 21:01:54 GMT", 35 | "ETag": "\"031cbfb6e1a055fa6dea52788f2a6582\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:36CC:13550615:56FC3EC2", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4982", 49 | "X-RateLimit-Reset": "1459375302", 50 | "X-Served-By": "a7f8a126c9ed3f1c4715a34c0ddc7290", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_08_add__alone_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T21:01:42", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":69,\"public_gists\":10,\"followers\":43,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Wed, 30 Mar 2016 21:01:55 GMT", 35 | "ETag": "\"031cbfb6e1a055fa6dea52788f2a6582\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:18060:E0C4726:56FC3EC3", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4981", 49 | "X-RateLimit-Reset": "1459375302", 50 | "X-Served-By": "c6c65e5196703428e7641f7d1e9bc353", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_09_add__default.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T21:01:42", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":69,\"public_gists\":10,\"followers\":43,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Wed, 30 Mar 2016 21:01:56 GMT", 35 | "ETag": "\"031cbfb6e1a055fa6dea52788f2a6582\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:6B9A:F0F9005:56FC3EC3", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4980", 49 | "X-RateLimit-Reset": "1459375302", 50 | "X-Served-By": "139317cebd6caf9cd03889139437f00b", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_10_add__default_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T21:01:43", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":69,\"public_gists\":10,\"followers\":43,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Wed, 30 Mar 2016 21:01:56 GMT", 35 | "ETag": "\"031cbfb6e1a055fa6dea52788f2a6582\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:36C4:3DE9768:56FC3EC4", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4979", 49 | "X-RateLimit-Reset": "1459375302", 50 | "X-Served-By": "bd82876e9bf04990f289ba22f246ee9b", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_11_add__alone_default.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T21:01:44", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":69,\"public_gists\":10,\"followers\":43,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Wed, 30 Mar 2016 21:01:57 GMT", 35 | "ETag": "\"031cbfb6e1a055fa6dea52788f2a6582\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:36C8:B433778:56FC3EC5", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4978", 49 | "X-RateLimit-Reset": "1459375302", 50 | "X-Served-By": "7b641bda7ec2ca7cd9df72d2578baf75", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_12_add__alone_default_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T21:01:44", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":69,\"public_gists\":10,\"followers\":43,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Wed, 30 Mar 2016 21:01:58 GMT", 35 | "ETag": "\"031cbfb6e1a055fa6dea52788f2a6582\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:6B9D:13660919:56FC3EC5", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4977", 49 | "X-RateLimit-Reset": "1459375302", 50 | "X-Served-By": "01d096e6cfe28f8aea352e988c332cd3", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_12_add__guess.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-05-03T18:22:47", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.6" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"guyzmo\",\"id\":254441,\"avatar_url\":\"https://avatars1.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/guyzmo\",\"html_url\":\"https://github.com/guyzmo\",\"followers_url\":\"https://api.github.com/users/guyzmo/followers\",\"following_url\":\"https://api.github.com/users/guyzmo/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/guyzmo/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/guyzmo/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/guyzmo/subscriptions\",\"organizations_url\":\"https://api.github.com/users/guyzmo/orgs\",\"repos_url\":\"https://api.github.com/users/guyzmo/repos\",\"events_url\":\"https://api.github.com/users/guyzmo/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/guyzmo/received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"guyzmo\",\"company\":null,\"blog\":\"http://guyzmo.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":\"I'm zmo on freenode.\\r\\n\\r\\n: :(){ :|:& };:\",\"public_repos\":94,\"public_gists\":33,\"followers\":62,\"following\":15,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2017-03-10T13:16:43Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1160", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Wed, 03 May 2017 18:22:47 GMT", 35 | "ETag": "\"8c85e3c34a5f4e44c937b162e8524a4d\"", 36 | "Last-Modified": "Fri, 10 Mar 2017 13:16:43 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "85B8:4F4D:C4F635:FB37F1:590A1FF7", 46 | "X-OAuth-Scopes": "repo, delete_repo, gist", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4985", 49 | "X-RateLimit-Reset": "1493837154", 50 | "X-Served-By": "1e9204dbc0447a6f39c3b3c44d87b3f8", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_14_request_fetch.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-05-12T17:07:00", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":72,\"public_gists\":10,\"followers\":44,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Thu, 12 May 2016 17:07:08 GMT", 35 | "ETag": "\"0aa481b18bc60170aa178c9983d294fc\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:CA11:CB5BF38:5734B83C", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4997", 49 | "X-RateLimit-Reset": "1463075761", 50 | "X-Served-By": "a474937f3b2fa272558fa6dc951018ad", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_15_request_fetch__bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-05-12T17:07:05", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":72,\"public_gists\":10,\"followers\":44,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Thu, 12 May 2016 17:07:14 GMT", 35 | "ETag": "\"0aa481b18bc60170aa178c9983d294fc\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:CA12:E9B9BBF:5734B841", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4996", 49 | "X-RateLimit-Reset": "1463075761", 50 | "X-Served-By": "139317cebd6caf9cd03889139437f00b", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_github_test_32_request_create__guess_repo.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-06-05T18:28:17", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "application/vnd.github.v3.full+json", 12 | "Accept-Charset": "utf-8", 13 | "Accept-Encoding": "identity", 14 | "Authorization": "token ", 15 | "Connection": "keep-alive", 16 | "Content-Type": "application/json", 17 | "User-Agent": "github3.py/0.9.5" 18 | }, 19 | "method": "GET", 20 | "uri": "https://api.github.com/user" 21 | }, 22 | "response": { 23 | "body": { 24 | "encoding": "utf-8", 25 | "string": "{\"login\":\"\",\"id\":254441,\"avatar_url\":\"https://avatars.githubusercontent.com/u/254441?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/\",\"html_url\":\"https://github.com/\",\"followers_url\":\"https://api.github.com/users//followers\",\"following_url\":\"https://api.github.com/users//following{/other_user}\",\"gists_url\":\"https://api.github.com/users//gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users//starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users//subscriptions\",\"organizations_url\":\"https://api.github.com/users//orgs\",\"repos_url\":\"https://api.github.com/users//repos\",\"events_url\":\"https://api.github.com/users//events{/privacy}\",\"received_events_url\":\"https://api.github.com/users//received_events\",\"type\":\"User\",\"site_admin\":false,\"name\":\"\",\"company\":null,\"blog\":\"http://.got.nothing.to/blog/\",\"location\":\"Paris\",\"email\":null,\"hireable\":true,\"bio\":null,\"public_repos\":76,\"public_gists\":14,\"followers\":44,\"following\":13,\"created_at\":\"2010-04-27T14:04:09Z\",\"updated_at\":\"2016-03-26T00:48:05Z\"}" 26 | }, 27 | "headers": { 28 | "Access-Control-Allow-Origin": "*", 29 | "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", 30 | "Cache-Control": "private, max-age=60, s-maxage=60", 31 | "Content-Length": "1118", 32 | "Content-Security-Policy": "default-src 'none'", 33 | "Content-Type": "application/json; charset=utf-8", 34 | "Date": "Sun, 05 Jun 2016 18:28:29 GMT", 35 | "ETag": "\"9f4ba01bc52e59c5fc2388a804f573a3\"", 36 | "Last-Modified": "Sat, 26 Mar 2016 00:48:05 GMT", 37 | "Server": "GitHub.com", 38 | "Status": "200 OK", 39 | "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", 40 | "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", 41 | "X-Accepted-OAuth-Scopes": "", 42 | "X-Content-Type-Options": "nosniff", 43 | "X-Frame-Options": "deny", 44 | "X-GitHub-Media-Type": "github.v3; param=full; format=json", 45 | "X-GitHub-Request-Id": "4EC11365:B214:1F2D3E48:57546F48", 46 | "X-OAuth-Scopes": "delete_repo, gist, repo", 47 | "X-RateLimit-Limit": "5000", 48 | "X-RateLimit-Remaining": "4841", 49 | "X-RateLimit-Reset": "1465152222", 50 | "X-Served-By": "ef96c2e493b28ffea49b891b085ed2dd", 51 | "X-XSS-Protection": "1; mode=block" 52 | }, 53 | "status": { 54 | "code": 200, 55 | "message": "OK" 56 | }, 57 | "url": "https://api.github.com/user" 58 | } 59 | } 60 | ], 61 | "recorded_with": "betamax/0.5.1" 62 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_05_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T14:13:39", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "gzip, deflate", 13 | "Connection": "keep-alive", 14 | "PRIVATE-TOKEN": "", 15 | "User-Agent": "python-requests/2.9.1" 16 | }, 17 | "method": "GET", 18 | "uri": "https://gitlab.com/api/v3/user" 19 | }, 20 | "response": { 21 | "body": { 22 | "encoding": null, 23 | "string": "{\"name\":\"\",\"username\":\"\",\"id\":470686,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/59014873897ec9bf64471e4ddf61c8d5?s=80\\u0026d=identicon\",\"web_url\":\"https://gitlab.com/u/\",\"created_at\":\"2016-03-30T13:15:50.649Z\",\"is_admin\":false,\"bio\":\"\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"\",\"last_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"confirmed_at\":\"2016-03-30T13:18:12.005Z\",\"email\":\"guyzmo+git-repo+projects+gitlab@m0g.net\",\"theme_id\":2,\"color_scheme_id\":1,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false,\"private_token\":\"\"}" 24 | }, 25 | "headers": { 26 | "Cache-Control": "max-age=0, private, must-revalidate", 27 | "Content-Length": "744", 28 | "Content-Type": "application/json", 29 | "Date": "Wed, 30 Mar 2016 14:13:53 GMT", 30 | "Etag": "W/\"76175f0e11cbbd54fc8475d86a9ab425\"", 31 | "Server": "nginx", 32 | "Status": "200 OK", 33 | "Vary": "Origin", 34 | "X-Request-Id": "a303f023-e541-4e3f-8f50-476f872fdd6c", 35 | "X-Runtime": "2.242892" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_06_add__name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T14:13:42", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "gzip, deflate", 13 | "Connection": "keep-alive", 14 | "PRIVATE-TOKEN": "", 15 | "User-Agent": "python-requests/2.9.1" 16 | }, 17 | "method": "GET", 18 | "uri": "https://gitlab.com/api/v3/user" 19 | }, 20 | "response": { 21 | "body": { 22 | "encoding": null, 23 | "string": "{\"name\":\"\",\"username\":\"\",\"id\":470686,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/59014873897ec9bf64471e4ddf61c8d5?s=80\\u0026d=identicon\",\"web_url\":\"https://gitlab.com/u/\",\"created_at\":\"2016-03-30T13:15:50.649Z\",\"is_admin\":false,\"bio\":\"\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"\",\"last_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"confirmed_at\":\"2016-03-30T13:18:12.005Z\",\"email\":\"guyzmo+git-repo+projects+gitlab@m0g.net\",\"theme_id\":2,\"color_scheme_id\":1,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false,\"private_token\":\"\"}" 24 | }, 25 | "headers": { 26 | "Cache-Control": "max-age=0, private, must-revalidate", 27 | "Content-Length": "744", 28 | "Content-Type": "application/json", 29 | "Date": "Wed, 30 Mar 2016 14:13:55 GMT", 30 | "Etag": "W/\"76175f0e11cbbd54fc8475d86a9ab425\"", 31 | "Server": "nginx", 32 | "Status": "200 OK", 33 | "Vary": "Origin", 34 | "X-Request-Id": "1cad153a-b448-4aec-aea0-f648ddbeeed2", 35 | "X-Runtime": "2.068688" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_07_add__alone.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T14:13:45", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "gzip, deflate", 13 | "Connection": "keep-alive", 14 | "PRIVATE-TOKEN": "", 15 | "User-Agent": "python-requests/2.9.1" 16 | }, 17 | "method": "GET", 18 | "uri": "https://gitlab.com/api/v3/user" 19 | }, 20 | "response": { 21 | "body": { 22 | "encoding": null, 23 | "string": "{\"name\":\"\",\"username\":\"\",\"id\":470686,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/59014873897ec9bf64471e4ddf61c8d5?s=80\\u0026d=identicon\",\"web_url\":\"https://gitlab.com/u/\",\"created_at\":\"2016-03-30T13:15:50.649Z\",\"is_admin\":false,\"bio\":\"\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"\",\"last_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"confirmed_at\":\"2016-03-30T13:18:12.005Z\",\"email\":\"guyzmo+git-repo+projects+gitlab@m0g.net\",\"theme_id\":2,\"color_scheme_id\":1,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false,\"private_token\":\"\"}" 24 | }, 25 | "headers": { 26 | "Cache-Control": "max-age=0, private, must-revalidate", 27 | "Content-Length": "744", 28 | "Content-Type": "application/json", 29 | "Date": "Wed, 30 Mar 2016 14:13:58 GMT", 30 | "Etag": "W/\"76175f0e11cbbd54fc8475d86a9ab425\"", 31 | "Server": "nginx", 32 | "Status": "200 OK", 33 | "Vary": "Origin", 34 | "X-Request-Id": "5bb0800d-eb5d-4706-94db-a41338e8ba1a", 35 | "X-Runtime": "2.910711" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_08_add__alone_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T14:13:47", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "gzip, deflate", 13 | "Connection": "keep-alive", 14 | "PRIVATE-TOKEN": "", 15 | "User-Agent": "python-requests/2.9.1" 16 | }, 17 | "method": "GET", 18 | "uri": "https://gitlab.com/api/v3/user" 19 | }, 20 | "response": { 21 | "body": { 22 | "encoding": null, 23 | "string": "{\"name\":\"\",\"username\":\"\",\"id\":470686,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/59014873897ec9bf64471e4ddf61c8d5?s=80\\u0026d=identicon\",\"web_url\":\"https://gitlab.com/u/\",\"created_at\":\"2016-03-30T13:15:50.649Z\",\"is_admin\":false,\"bio\":\"\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"\",\"last_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"confirmed_at\":\"2016-03-30T13:18:12.005Z\",\"email\":\"guyzmo+git-repo+projects+gitlab@m0g.net\",\"theme_id\":2,\"color_scheme_id\":1,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false,\"private_token\":\"\"}" 24 | }, 25 | "headers": { 26 | "Cache-Control": "max-age=0, private, must-revalidate", 27 | "Content-Length": "744", 28 | "Content-Type": "application/json", 29 | "Date": "Wed, 30 Mar 2016 14:14:00 GMT", 30 | "Etag": "W/\"76175f0e11cbbd54fc8475d86a9ab425\"", 31 | "Server": "nginx", 32 | "Status": "200 OK", 33 | "Vary": "Origin", 34 | "X-Request-Id": "2903e867-dce5-45f5-9b97-572c802cc9a1", 35 | "X-Runtime": "2.084946" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_09_add__default.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T14:13:52", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "gzip, deflate", 13 | "Connection": "keep-alive", 14 | "PRIVATE-TOKEN": "", 15 | "User-Agent": "python-requests/2.9.1" 16 | }, 17 | "method": "GET", 18 | "uri": "https://gitlab.com/api/v3/user" 19 | }, 20 | "response": { 21 | "body": { 22 | "encoding": null, 23 | "string": "{\"name\":\"\",\"username\":\"\",\"id\":470686,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/59014873897ec9bf64471e4ddf61c8d5?s=80\\u0026d=identicon\",\"web_url\":\"https://gitlab.com/u/\",\"created_at\":\"2016-03-30T13:15:50.649Z\",\"is_admin\":false,\"bio\":\"\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"\",\"last_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"confirmed_at\":\"2016-03-30T13:18:12.005Z\",\"email\":\"guyzmo+git-repo+projects+gitlab@m0g.net\",\"theme_id\":2,\"color_scheme_id\":1,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false,\"private_token\":\"\"}" 24 | }, 25 | "headers": { 26 | "Cache-Control": "max-age=0, private, must-revalidate", 27 | "Content-Length": "744", 28 | "Content-Type": "application/json", 29 | "Date": "Wed, 30 Mar 2016 14:14:05 GMT", 30 | "Etag": "W/\"76175f0e11cbbd54fc8475d86a9ab425\"", 31 | "Server": "nginx", 32 | "Status": "200 OK", 33 | "Vary": "Origin", 34 | "X-Request-Id": "c6c49d0f-6a66-476a-b83e-f4617dc484ee", 35 | "X-Runtime": "4.823866" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_10_add__default_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T14:13:58", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "gzip, deflate", 13 | "Connection": "keep-alive", 14 | "PRIVATE-TOKEN": "", 15 | "User-Agent": "python-requests/2.9.1" 16 | }, 17 | "method": "GET", 18 | "uri": "https://gitlab.com/api/v3/user" 19 | }, 20 | "response": { 21 | "body": { 22 | "encoding": null, 23 | "string": "{\"name\":\"\",\"username\":\"\",\"id\":470686,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/59014873897ec9bf64471e4ddf61c8d5?s=80\\u0026d=identicon\",\"web_url\":\"https://gitlab.com/u/\",\"created_at\":\"2016-03-30T13:15:50.649Z\",\"is_admin\":false,\"bio\":\"\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"\",\"last_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"confirmed_at\":\"2016-03-30T13:18:12.005Z\",\"email\":\"guyzmo+git-repo+projects+gitlab@m0g.net\",\"theme_id\":2,\"color_scheme_id\":1,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false,\"private_token\":\"\"}" 24 | }, 25 | "headers": { 26 | "Cache-Control": "max-age=0, private, must-revalidate", 27 | "Content-Length": "744", 28 | "Content-Type": "application/json", 29 | "Date": "Wed, 30 Mar 2016 14:14:11 GMT", 30 | "Etag": "W/\"76175f0e11cbbd54fc8475d86a9ab425\"", 31 | "Server": "nginx", 32 | "Status": "200 OK", 33 | "Vary": "Origin", 34 | "X-Request-Id": "97f25bc6-a47f-4b91-945e-d90fcd202671", 35 | "X-Runtime": "4.258203" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_11_add__alone_default.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T14:13:58", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "gzip, deflate", 13 | "Connection": "keep-alive", 14 | "PRIVATE-TOKEN": "", 15 | "User-Agent": "python-requests/2.9.1" 16 | }, 17 | "method": "GET", 18 | "uri": "https://gitlab.com/api/v3/user" 19 | }, 20 | "response": { 21 | "body": { 22 | "encoding": null, 23 | "string": "{\"name\":\"\",\"username\":\"\",\"id\":470686,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/59014873897ec9bf64471e4ddf61c8d5?s=80\\u0026d=identicon\",\"web_url\":\"https://gitlab.com/u/\",\"created_at\":\"2016-03-30T13:15:50.649Z\",\"is_admin\":false,\"bio\":\"\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"\",\"last_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"confirmed_at\":\"2016-03-30T13:18:12.005Z\",\"email\":\"guyzmo+git-repo+projects+gitlab@m0g.net\",\"theme_id\":2,\"color_scheme_id\":1,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false,\"private_token\":\"\"}" 24 | }, 25 | "headers": { 26 | "Cache-Control": "max-age=0, private, must-revalidate", 27 | "Content-Length": "744", 28 | "Content-Type": "application/json", 29 | "Date": "Wed, 30 Mar 2016 14:14:12 GMT", 30 | "Etag": "W/\"76175f0e11cbbd54fc8475d86a9ab425\"", 31 | "Server": "nginx", 32 | "Status": "200 OK", 33 | "Vary": "Origin", 34 | "X-Request-Id": "feb4f436-e35c-4657-a8bd-8807157253e6", 35 | "X-Runtime": "0.097189" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_12_add__alone_default_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-03-30T14:14:00", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "gzip, deflate", 13 | "Connection": "keep-alive", 14 | "PRIVATE-TOKEN": "", 15 | "User-Agent": "python-requests/2.9.1" 16 | }, 17 | "method": "GET", 18 | "uri": "https://gitlab.com/api/v3/user" 19 | }, 20 | "response": { 21 | "body": { 22 | "encoding": null, 23 | "string": "{\"name\":\"\",\"username\":\"\",\"id\":470686,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/59014873897ec9bf64471e4ddf61c8d5?s=80\\u0026d=identicon\",\"web_url\":\"https://gitlab.com/u/\",\"created_at\":\"2016-03-30T13:15:50.649Z\",\"is_admin\":false,\"bio\":\"\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"\",\"last_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"confirmed_at\":\"2016-03-30T13:18:12.005Z\",\"email\":\"guyzmo+git-repo+projects+gitlab@m0g.net\",\"theme_id\":2,\"color_scheme_id\":1,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-03-30T13:19:50.252Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false,\"private_token\":\"\"}" 24 | }, 25 | "headers": { 26 | "Cache-Control": "max-age=0, private, must-revalidate", 27 | "Content-Length": "744", 28 | "Content-Type": "application/json", 29 | "Date": "Wed, 30 Mar 2016 14:14:14 GMT", 30 | "Etag": "W/\"76175f0e11cbbd54fc8475d86a9ab425\"", 31 | "Server": "nginx", 32 | "Status": "200 OK", 33 | "Vary": "Origin", 34 | "X-Request-Id": "fa979a63-6722-4f83-9b93-bd3f648ea733", 35 | "X-Runtime": "0.141205" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_13_snippet_list_with_non_existent_project.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-23T17:09:14", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Tm9uZTpOb25l", 14 | "Connection": "keep-alive", 15 | "PRIVATE-TOKEN": "", 16 | "User-Agent": "python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://gitlab.com/api/v3/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": null, 24 | "string": "{\"name\":\"Guyzmo\",\"username\":\"\",\"id\":459552,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/917dc55c63895af9953df7d798cdd5f8?s=80&d=identicon\",\"web_url\":\"https://gitlab.com/\",\"created_at\":\"2016-03-21T12:52:59.859Z\",\"is_admin\":false,\"bio\":\": :(){ :|:& };:\",\"location\":\"Earth, Solar system, Milkyway, Universe\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"http://i.got.nothing.to/blog\",\"organization\":null,\"last_sign_in_at\":\"2016-12-14T13:20:32.657Z\",\"confirmed_at\":\"2016-03-21T13:48:05.234Z\",\"email\":\"+gitlab@m0g.net\",\"theme_id\":4,\"color_scheme_id\":4,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-12-19T16:01:14.230Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false}" 25 | }, 26 | "headers": { 27 | "Cache-Control": "max-age=0, private, must-revalidate", 28 | "Content-Length": "775", 29 | "Content-Type": "application/json", 30 | "Date": "Fri, 23 Dec 2016 17:09:14 GMT", 31 | "Etag": "W/\"0b3d58265bf46a72f63a7ab27aad6cdd\"", 32 | "Server": "nginx", 33 | "Vary": "Origin", 34 | "X-Request-Id": "e9351043-60ee-44ad-a19b-fe8acf8e89c2", 35 | "X-Runtime": "0.064719" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | }, 44 | { 45 | "recorded_at": "2016-12-23T17:09:14", 46 | "request": { 47 | "body": { 48 | "encoding": "utf-8", 49 | "string": "" 50 | }, 51 | "headers": { 52 | "Accept": "*/*", 53 | "Accept-Encoding": "identity", 54 | "Authorization": "Basic Tm9uZTpOb25l", 55 | "Connection": "keep-alive", 56 | "PRIVATE-TOKEN": "", 57 | "User-Agent": "python-requests/2.12.4" 58 | }, 59 | "method": "GET", 60 | "uri": "https://gitlab.com/api/v3/projects/%2Fnon-existent" 61 | }, 62 | "response": { 63 | "body": { 64 | "encoding": null, 65 | "string": "{\"message\":\"404 Project Not Found\"}" 66 | }, 67 | "headers": { 68 | "Cache-Control": "no-cache", 69 | "Content-Length": "35", 70 | "Content-Type": "application/json", 71 | "Date": "Fri, 23 Dec 2016 17:09:14 GMT", 72 | "Server": "nginx", 73 | "Vary": "Origin", 74 | "X-Request-Id": "76022041-44a0-4df0-9cd8-c1294066258a", 75 | "X-Runtime": "0.014176" 76 | }, 77 | "status": { 78 | "code": 404, 79 | "message": "Not Found" 80 | }, 81 | "url": "https://gitlab.com/api/v3/projects/%2Fnon-existent" 82 | } 83 | } 84 | ], 85 | "recorded_with": "betamax/0.5.1" 86 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_14_snippet_clone.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-23T17:09:15", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Tm9uZTpOb25l", 14 | "Connection": "keep-alive", 15 | "PRIVATE-TOKEN": "", 16 | "User-Agent": "python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://gitlab.com/api/v3/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": null, 24 | "string": "{\"name\":\"Guyzmo\",\"username\":\"\",\"id\":459552,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/917dc55c63895af9953df7d798cdd5f8?s=80&d=identicon\",\"web_url\":\"https://gitlab.com/\",\"created_at\":\"2016-03-21T12:52:59.859Z\",\"is_admin\":false,\"bio\":\": :(){ :|:& };:\",\"location\":\"Earth, Solar system, Milkyway, Universe\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"http://i.got.nothing.to/blog\",\"organization\":null,\"last_sign_in_at\":\"2016-12-14T13:20:32.657Z\",\"confirmed_at\":\"2016-03-21T13:48:05.234Z\",\"email\":\"+gitlab@m0g.net\",\"theme_id\":4,\"color_scheme_id\":4,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-12-19T16:01:14.230Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false}" 25 | }, 26 | "headers": { 27 | "Cache-Control": "max-age=0, private, must-revalidate", 28 | "Content-Length": "775", 29 | "Content-Type": "application/json", 30 | "Date": "Fri, 23 Dec 2016 17:09:15 GMT", 31 | "Etag": "W/\"0b3d58265bf46a72f63a7ab27aad6cdd\"", 32 | "Server": "nginx", 33 | "Vary": "Origin", 34 | "X-Request-Id": "9fff4d01-f5fe-4552-b695-5b981c60d7e9", 35 | "X-Runtime": "0.043232" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_15_snippet_fetch_with_bad_project_snippet.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-23T17:09:27", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Tm9uZTpOb25l", 14 | "Connection": "keep-alive", 15 | "PRIVATE-TOKEN": "", 16 | "User-Agent": "python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://gitlab.com/api/v3/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": null, 24 | "string": "{\"name\":\"Guyzmo\",\"username\":\"\",\"id\":459552,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/917dc55c63895af9953df7d798cdd5f8?s=80&d=identicon\",\"web_url\":\"https://gitlab.com/\",\"created_at\":\"2016-03-21T12:52:59.859Z\",\"is_admin\":false,\"bio\":\": :(){ :|:& };:\",\"location\":\"Earth, Solar system, Milkyway, Universe\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"http://i.got.nothing.to/blog\",\"organization\":null,\"last_sign_in_at\":\"2016-12-14T13:20:32.657Z\",\"confirmed_at\":\"2016-03-21T13:48:05.234Z\",\"email\":\"+gitlab@m0g.net\",\"theme_id\":4,\"color_scheme_id\":4,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-12-19T16:01:14.230Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false}" 25 | }, 26 | "headers": { 27 | "Cache-Control": "max-age=0, private, must-revalidate", 28 | "Content-Length": "775", 29 | "Content-Type": "application/json", 30 | "Date": "Fri, 23 Dec 2016 17:09:26 GMT", 31 | "Etag": "W/\"0b3d58265bf46a72f63a7ab27aad6cdd\"", 32 | "Server": "nginx", 33 | "Vary": "Origin", 34 | "X-Request-Id": "c0d0f269-4da0-419c-8d05-7b3146125e73", 35 | "X-Runtime": "0.043925" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | }, 44 | { 45 | "recorded_at": "2016-12-23T17:09:27", 46 | "request": { 47 | "body": { 48 | "encoding": "utf-8", 49 | "string": "" 50 | }, 51 | "headers": { 52 | "Accept": "*/*", 53 | "Accept-Encoding": "identity", 54 | "Authorization": "Basic Tm9uZTpOb25l", 55 | "Connection": "keep-alive", 56 | "PRIVATE-TOKEN": "", 57 | "User-Agent": "python-requests/2.12.4" 58 | }, 59 | "method": "GET", 60 | "uri": "https://gitlab.com/api/v3/snippets/42" 61 | }, 62 | "response": { 63 | "body": { 64 | "encoding": null, 65 | "string": "{\"message\":\"404 Not found\"}" 66 | }, 67 | "headers": { 68 | "Cache-Control": "no-cache", 69 | "Content-Length": "27", 70 | "Content-Type": "application/json", 71 | "Date": "Fri, 23 Dec 2016 17:09:27 GMT", 72 | "Server": "nginx", 73 | "Vary": "Origin", 74 | "X-Request-Id": "ffca2631-f97a-4fe8-bb46-46eee25c07ec", 75 | "X-Runtime": "0.037575" 76 | }, 77 | "status": { 78 | "code": 404, 79 | "message": "Not Found" 80 | }, 81 | "url": "https://gitlab.com/api/v3/snippets/42" 82 | } 83 | } 84 | ], 85 | "recorded_with": "betamax/0.5.1" 86 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_16_snippet_create_snippet__file_not_exist.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-23T16:31:19", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Tm9uZTpOb25l", 14 | "Connection": "keep-alive", 15 | "PRIVATE-TOKEN": "", 16 | "User-Agent": "python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://gitlab.com/api/v3/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": null, 24 | "string": "{\"name\":\"Guyzmo\",\"username\":\"\",\"id\":459552,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/917dc55c63895af9953df7d798cdd5f8?s=80&d=identicon\",\"web_url\":\"https://gitlab.com/\",\"created_at\":\"2016-03-21T12:52:59.859Z\",\"is_admin\":false,\"bio\":\": :(){ :|:& };:\",\"location\":\"Earth, Solar system, Milkyway, Universe\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"http://i.got.nothing.to/blog\",\"organization\":null,\"last_sign_in_at\":\"2016-12-14T13:20:32.657Z\",\"confirmed_at\":\"2016-03-21T13:48:05.234Z\",\"email\":\"+gitlab@m0g.net\",\"theme_id\":4,\"color_scheme_id\":4,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-12-19T16:01:14.230Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false}" 25 | }, 26 | "headers": { 27 | "Cache-Control": "max-age=0, private, must-revalidate", 28 | "Content-Length": "775", 29 | "Content-Type": "application/json", 30 | "Date": "Fri, 23 Dec 2016 16:31:19 GMT", 31 | "Etag": "W/\"0b3d58265bf46a72f63a7ab27aad6cdd\"", 32 | "Server": "nginx", 33 | "Vary": "Origin", 34 | "X-Request-Id": "789876ae-8a5d-48b0-b2b7-2765abdb099c", 35 | "X-Runtime": "0.039663" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_16_snippet_create_snippet_dir.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-23T16:29:10", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Tm9uZTpOb25l", 14 | "Connection": "keep-alive", 15 | "PRIVATE-TOKEN": "", 16 | "User-Agent": "python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://gitlab.com/api/v3/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": null, 24 | "string": "{\"name\":\"Guyzmo\",\"username\":\"\",\"id\":459552,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/917dc55c63895af9953df7d798cdd5f8?s=80&d=identicon\",\"web_url\":\"https://gitlab.com/\",\"created_at\":\"2016-03-21T12:52:59.859Z\",\"is_admin\":false,\"bio\":\": :(){ :|:& };:\",\"location\":\"Earth, Solar system, Milkyway, Universe\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"http://i.got.nothing.to/blog\",\"organization\":null,\"last_sign_in_at\":\"2016-12-14T13:20:32.657Z\",\"confirmed_at\":\"2016-03-21T13:48:05.234Z\",\"email\":\"+gitlab@m0g.net\",\"theme_id\":4,\"color_scheme_id\":4,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-12-19T16:01:14.230Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false}" 25 | }, 26 | "headers": { 27 | "Cache-Control": "max-age=0, private, must-revalidate", 28 | "Content-Length": "775", 29 | "Content-Type": "application/json", 30 | "Date": "Fri, 23 Dec 2016 16:29:09 GMT", 31 | "Etag": "W/\"0b3d58265bf46a72f63a7ab27aad6cdd\"", 32 | "Server": "nginx", 33 | "Vary": "Origin", 34 | "X-Request-Id": "343e6f90-aacc-40d7-88c0-fb356749da86", 35 | "X-Runtime": "0.064658" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_16_snippet_create_snippet_file_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-23T17:09:29", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Tm9uZTpOb25l", 14 | "Connection": "keep-alive", 15 | "PRIVATE-TOKEN": "", 16 | "User-Agent": "python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://gitlab.com/api/v3/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": null, 24 | "string": "{\"name\":\"Guyzmo\",\"username\":\"\",\"id\":459552,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/917dc55c63895af9953df7d798cdd5f8?s=80&d=identicon\",\"web_url\":\"https://gitlab.com/\",\"created_at\":\"2016-03-21T12:52:59.859Z\",\"is_admin\":false,\"bio\":\": :(){ :|:& };:\",\"location\":\"Earth, Solar system, Milkyway, Universe\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"http://i.got.nothing.to/blog\",\"organization\":null,\"last_sign_in_at\":\"2016-12-14T13:20:32.657Z\",\"confirmed_at\":\"2016-03-21T13:48:05.234Z\",\"email\":\"+gitlab@m0g.net\",\"theme_id\":4,\"color_scheme_id\":4,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-12-19T16:01:14.230Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false}" 25 | }, 26 | "headers": { 27 | "Cache-Control": "max-age=0, private, must-revalidate", 28 | "Content-Length": "775", 29 | "Content-Type": "application/json", 30 | "Date": "Fri, 23 Dec 2016 17:09:29 GMT", 31 | "Etag": "W/\"0b3d58265bf46a72f63a7ab27aad6cdd\"", 32 | "Server": "nginx", 33 | "Vary": "Origin", 34 | "X-Request-Id": "0e2c133f-8c9d-47c8-8845-0ea98a9fc280", 35 | "X-Runtime": "0.045627" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | } 44 | ], 45 | "recorded_with": "betamax/0.5.1" 46 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_17_snippet_global_delete__not_exist.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-12-23T17:01:06", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Tm9uZTpOb25l", 14 | "Connection": "keep-alive", 15 | "PRIVATE-TOKEN": "", 16 | "User-Agent": "python-requests/2.12.4" 17 | }, 18 | "method": "GET", 19 | "uri": "https://gitlab.com/api/v3/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": null, 24 | "string": "{\"name\":\"Guyzmo\",\"username\":\"\",\"id\":459552,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/917dc55c63895af9953df7d798cdd5f8?s=80&d=identicon\",\"web_url\":\"https://gitlab.com/\",\"created_at\":\"2016-03-21T12:52:59.859Z\",\"is_admin\":false,\"bio\":\": :(){ :|:& };:\",\"location\":\"Earth, Solar system, Milkyway, Universe\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"http://i.got.nothing.to/blog\",\"organization\":null,\"last_sign_in_at\":\"2016-12-14T13:20:32.657Z\",\"confirmed_at\":\"2016-03-21T13:48:05.234Z\",\"email\":\"+gitlab@m0g.net\",\"theme_id\":4,\"color_scheme_id\":4,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-12-19T16:01:14.230Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false}" 25 | }, 26 | "headers": { 27 | "Cache-Control": "max-age=0, private, must-revalidate", 28 | "Content-Length": "775", 29 | "Content-Type": "application/json", 30 | "Date": "Fri, 23 Dec 2016 17:01:06 GMT", 31 | "Etag": "W/\"0b3d58265bf46a72f63a7ab27aad6cdd\"", 32 | "Server": "nginx", 33 | "Vary": "Origin", 34 | "X-Request-Id": "01f7cb6b-c920-4176-9fa4-906fef200a11", 35 | "X-Runtime": "0.045670" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | }, 44 | { 45 | "recorded_at": "2016-12-23T17:01:07", 46 | "request": { 47 | "body": { 48 | "encoding": "utf-8", 49 | "string": "" 50 | }, 51 | "headers": { 52 | "Accept": "*/*", 53 | "Accept-Encoding": "identity", 54 | "Authorization": "Basic Tm9uZTpOb25l", 55 | "Connection": "keep-alive", 56 | "PRIVATE-TOKEN": "", 57 | "User-Agent": "python-requests/2.12.4" 58 | }, 59 | "method": "GET", 60 | "uri": "https://gitlab.com/api/v3/snippets/32304" 61 | }, 62 | "response": { 63 | "body": { 64 | "encoding": null, 65 | "string": "{\"message\":\"404 Not found\"}" 66 | }, 67 | "headers": { 68 | "Cache-Control": "no-cache", 69 | "Content-Length": "27", 70 | "Content-Type": "application/json", 71 | "Date": "Fri, 23 Dec 2016 17:01:07 GMT", 72 | "Server": "nginx", 73 | "Vary": "Origin", 74 | "X-Request-Id": "a3e69d0a-949e-4f44-a346-867bf227f603", 75 | "X-Runtime": "0.028450" 76 | }, 77 | "status": { 78 | "code": 404, 79 | "message": "Not Found" 80 | }, 81 | "url": "https://gitlab.com/api/v3/snippets/32304" 82 | } 83 | } 84 | ], 85 | "recorded_with": "betamax/0.5.1" 86 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gitlab_test_20_request_create__bad_repo.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2016-11-28T00:02:36", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Authorization": "Basic Tm9uZTpOb25l", 14 | "Connection": "keep-alive", 15 | "PRIVATE-TOKEN": "", 16 | "User-Agent": "python-requests/2.10.0" 17 | }, 18 | "method": "GET", 19 | "uri": "https://gitlab.com/api/v3/user" 20 | }, 21 | "response": { 22 | "body": { 23 | "encoding": null, 24 | "string": "{\"name\":\"Guyzmo\",\"username\":\"\",\"id\":459552,\"state\":\"active\",\"avatar_url\":\"https://secure.gravatar.com/avatar/917dc55c63895af9953df7d798cdd5f8?s=80&d=identicon\",\"web_url\":\"https://gitlab.com/\",\"created_at\":\"2016-03-21T12:52:59.859Z\",\"is_admin\":false,\"bio\":\": :(){ :|:& };:\",\"location\":\"Earth, Solar system, Milkyway, Universe\",\"skype\":\"\",\"linkedin\":\"\",\"twitter\":\"\",\"website_url\":\"http://i.got.nothing.to/blog\",\"organization\":null,\"last_sign_in_at\":\"2016-11-05T15:04:27.341Z\",\"confirmed_at\":\"2016-03-21T13:48:05.234Z\",\"email\":\"+gitlab@m0g.net\",\"theme_id\":4,\"color_scheme_id\":4,\"projects_limit\":100000,\"current_sign_in_at\":\"2016-11-25T02:04:59.533Z\",\"identities\":[],\"can_create_group\":true,\"can_create_project\":true,\"two_factor_enabled\":false,\"external\":false}" 25 | }, 26 | "headers": { 27 | "Cache-Control": "max-age=0, private, must-revalidate", 28 | "Content-Length": "775", 29 | "Content-Type": "application/json", 30 | "Date": "Mon, 28 Nov 2016 00:02:36 GMT", 31 | "Etag": "W/\"757252f72cad7c2cbb99b765d65cc424\"", 32 | "Server": "nginx", 33 | "Vary": "Origin", 34 | "X-Request-Id": "deae28ce-e56d-4385-be7e-8487e5ccef47", 35 | "X-Runtime": "0.040103" 36 | }, 37 | "status": { 38 | "code": 200, 39 | "message": "OK" 40 | }, 41 | "url": "https://gitlab.com/api/v3/user" 42 | } 43 | }, 44 | { 45 | "recorded_at": "2016-11-28T00:02:36", 46 | "request": { 47 | "body": { 48 | "encoding": "utf-8", 49 | "string": "" 50 | }, 51 | "headers": { 52 | "Accept": "*/*", 53 | "Accept-Encoding": "identity", 54 | "Authorization": "Basic Tm9uZTpOb25l", 55 | "Connection": "keep-alive", 56 | "PRIVATE-TOKEN": "", 57 | "User-Agent": "python-requests/2.10.0" 58 | }, 59 | "method": "GET", 60 | "uri": "https://gitlab.com/api/v3/projects/%2Fdoes_not_exists" 61 | }, 62 | "response": { 63 | "body": { 64 | "encoding": null, 65 | "string": "{\"message\":\"404 Project Not Found\"}" 66 | }, 67 | "headers": { 68 | "Cache-Control": "no-cache", 69 | "Content-Length": "35", 70 | "Content-Type": "application/json", 71 | "Date": "Mon, 28 Nov 2016 00:02:36 GMT", 72 | "Server": "nginx", 73 | "Vary": "Origin", 74 | "X-Request-Id": "1d945c60-c037-458d-8eda-f9e39aedc328", 75 | "X-Runtime": "0.018537" 76 | }, 77 | "status": { 78 | "code": 404, 79 | "message": "Not Found" 80 | }, 81 | "url": "https://gitlab.com/api/v3/projects/guyzmo%2Fdoes_not_exists" 82 | } 83 | } 84 | ], 85 | "recorded_with": "betamax/0.5.1" 86 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_01_create__already_exists.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-01-21T14:04:09", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.12.4" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "UTF-8", 22 | "string": "{\"id\":3,\"login\":\"\",\"full_name\":\"\",\"email\":\"guyzmo@gogs.loopback\",\"avatar_url\":\"/avatars/3\",\"username\":\"\"}" 23 | }, 24 | "headers": { 25 | "Content-Length": "152", 26 | "Content-Type": "application/json; charset=UTF-8", 27 | "Date": "Sat, 21 Jan 2017 14:04:09 GMT", 28 | "Proxy-Connection": "keep-alive", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647", 30 | "X-Frame-Options": "SAMEORIGIN" 31 | }, 32 | "status": { 33 | "code": 200, 34 | "message": "OK" 35 | }, 36 | "url": "/api/v1/user?token=" 37 | } 38 | }, 39 | { 40 | "recorded_at": "2017-01-21T14:04:09", 41 | "request": { 42 | "body": { 43 | "encoding": "utf-8", 44 | "string": "name=git-repo&auto_init=False&private=False" 45 | }, 46 | "headers": { 47 | "Accept": "*/*", 48 | "Accept-Encoding": "identity", 49 | "Connection": "keep-alive", 50 | "Content-Length": "43", 51 | "Content-Type": "application/x-www-form-urlencoded", 52 | "Cookie": "i_like_gogits=8454d8bde5123653; _csrf=AaMYap7BESTX7xci37mALGGEVaA6MTQ4NTAwNzQ0ODg5OTkxMDkwMA%3D%3D; lang=en-US", 53 | "User-Agent": "python-requests/2.12.4" 54 | }, 55 | "method": "POST", 56 | "uri": "/api/v1/user/repos?token=" 57 | }, 58 | "response": { 59 | "body": { 60 | "encoding": "UTF-8", 61 | "string": "{\"message\":\"repository already exists [uname: , name: git-repo]\",\"url\":\"https://godoc.org/github.com/go-gitea/go-sdk/gitea\"}" 62 | }, 63 | "headers": { 64 | "Content-Length": "137", 65 | "Content-Type": "application/json; charset=UTF-8", 66 | "Date": "Sat, 21 Jan 2017 14:04:09 GMT", 67 | "Proxy-Connection": "keep-alive", 68 | "X-Frame-Options": "SAMEORIGIN" 69 | }, 70 | "status": { 71 | "code": 422, 72 | "message": "Unprocessable Entity" 73 | }, 74 | "url": "/api/v1/user/repos?token=" 75 | } 76 | } 77 | ], 78 | "recorded_with": "betamax/0.5.1" 79 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_04_clone.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-05-03T23:33:35", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.13.0" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "UTF-8", 22 | "string": "{\"id\":10838,\"login\":\"\",\"full_name\":\"\",\"email\":\"z+gogs+test@m0g.net\",\"avatar_url\":\"https://secure.gravatar.com/avatar/78b33567fde2dd6b34b94416ae8e2d86\",\"username\":\"\"}" 23 | }, 24 | "headers": { 25 | "Content-Length": "177", 26 | "Content-Type": "application/json; charset=UTF-8", 27 | "Date": "Wed, 03 May 2017 23:33:35 GMT", 28 | "Server": "Caddy", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647" 30 | }, 31 | "status": { 32 | "code": 200, 33 | "message": "OK" 34 | }, 35 | "url": "/api/v1/user?token=" 36 | } 37 | }, 38 | { 39 | "recorded_at": "2017-05-03T23:33:35", 40 | "request": { 41 | "body": { 42 | "encoding": "utf-8", 43 | "string": "" 44 | }, 45 | "headers": { 46 | "Accept": "*/*", 47 | "Accept-Encoding": "identity", 48 | "Connection": "keep-alive", 49 | "Cookie": "_csrf=Tch6ziMFxZ85gTgbPVN_0kK9C4c6MTQ5Mzg1NDQxNDk1MTU5MTIwMw%3D%3D; i_like_gogits=fff1fcf75ad7f845; lang=en-US", 50 | "User-Agent": "python-requests/2.13.0" 51 | }, 52 | "method": "GET", 53 | "uri": "/api/v1/repos//git-repo?token=" 54 | }, 55 | "response": { 56 | "body": { 57 | "encoding": "UTF-8", 58 | "string": "{\"id\":8022,\"owner\":{\"id\":10838,\"login\":\"\",\"full_name\":\"\",\"email\":\"z+gogs+test@m0g.net\",\"avatar_url\":\"https://secure.gravatar.com/avatar/78b33567fde2dd6b34b94416ae8e2d86\",\"username\":\"\"},\"name\":\"git-repo\",\"full_name\":\"/git-repo\",\"description\":\"\",\"private\":false,\"fork\":false,\"mirror\":false,\"html_url\":\"//git-repo\",\"ssh_url\":\"git@try.gogs.io:/git-repo.git\",\"clone_url\":\"//git-repo.git\",\"website\":\"\",\"stars_count\":0,\"forks_count\":0,\"watchers_count\":1,\"open_issues_count\":0,\"default_branch\":\"master\",\"created_at\":\"2017-01-22T18:41:19Z\",\"updated_at\":\"2017-01-22T18:41:19Z\",\"permissions\":{\"admin\":true,\"push\":true,\"pull\":true}}" 59 | }, 60 | "headers": { 61 | "Content-Length": "694", 62 | "Content-Type": "application/json; charset=UTF-8", 63 | "Date": "Wed, 03 May 2017 23:33:35 GMT", 64 | "Server": "Caddy" 65 | }, 66 | "status": { 67 | "code": 200, 68 | "message": "OK" 69 | }, 70 | "url": "/api/v1/repos//git-repo?token=" 71 | } 72 | } 73 | ], 74 | "recorded_with": "betamax/0.5.1" 75 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_04_clone__too_many_slashes.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-08-06T19:07:26", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.18.1" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "utf-8", 22 | "string": "" 23 | }, 24 | "headers": { 25 | "Content-Length": "0", 26 | "Content-Type": "text/plain; charset=utf-8", 27 | "Date": "Sun, 06 Aug 2017 19:06:36 GMT", 28 | "Server": "Caddy", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647" 30 | }, 31 | "status": { 32 | "code": 401, 33 | "message": "Unauthorized" 34 | }, 35 | "url": "/api/v1/user?token=" 36 | } 37 | } 38 | ], 39 | "recorded_with": "betamax/0.5.1" 40 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_05_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-01-21T14:04:16", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.12.4" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "UTF-8", 22 | "string": "{\"id\":3,\"login\":\"\",\"full_name\":\"\",\"email\":\"guyzmo@gogs.loopback\",\"avatar_url\":\"/avatars/3\",\"username\":\"\"}" 23 | }, 24 | "headers": { 25 | "Content-Length": "152", 26 | "Content-Type": "application/json; charset=UTF-8", 27 | "Date": "Sat, 21 Jan 2017 14:04:16 GMT", 28 | "Proxy-Connection": "keep-alive", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647", 30 | "X-Frame-Options": "SAMEORIGIN" 31 | }, 32 | "status": { 33 | "code": 200, 34 | "message": "OK" 35 | }, 36 | "url": "/api/v1/user?token=" 37 | } 38 | } 39 | ], 40 | "recorded_with": "betamax/0.5.1" 41 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_06_add__name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-01-21T14:04:17", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.12.4" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "UTF-8", 22 | "string": "{\"id\":3,\"login\":\"\",\"full_name\":\"\",\"email\":\"guyzmo@gogs.loopback\",\"avatar_url\":\"/avatars/3\",\"username\":\"\"}" 23 | }, 24 | "headers": { 25 | "Content-Length": "152", 26 | "Content-Type": "application/json; charset=UTF-8", 27 | "Date": "Sat, 21 Jan 2017 14:04:17 GMT", 28 | "Proxy-Connection": "keep-alive", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647", 30 | "X-Frame-Options": "SAMEORIGIN" 31 | }, 32 | "status": { 33 | "code": 200, 34 | "message": "OK" 35 | }, 36 | "url": "/api/v1/user?token=" 37 | } 38 | } 39 | ], 40 | "recorded_with": "betamax/0.5.1" 41 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_07_add__alone.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-01-21T14:04:17", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.12.4" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "UTF-8", 22 | "string": "{\"id\":3,\"login\":\"\",\"full_name\":\"\",\"email\":\"guyzmo@gogs.loopback\",\"avatar_url\":\"/avatars/3\",\"username\":\"\"}" 23 | }, 24 | "headers": { 25 | "Content-Length": "152", 26 | "Content-Type": "application/json; charset=UTF-8", 27 | "Date": "Sat, 21 Jan 2017 14:04:17 GMT", 28 | "Proxy-Connection": "keep-alive", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647", 30 | "X-Frame-Options": "SAMEORIGIN" 31 | }, 32 | "status": { 33 | "code": 200, 34 | "message": "OK" 35 | }, 36 | "url": "/api/v1/user?token=" 37 | } 38 | } 39 | ], 40 | "recorded_with": "betamax/0.5.1" 41 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_08_add__alone_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-01-21T14:04:18", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.12.4" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "UTF-8", 22 | "string": "{\"id\":3,\"login\":\"\",\"full_name\":\"\",\"email\":\"guyzmo@gogs.loopback\",\"avatar_url\":\"/avatars/3\",\"username\":\"\"}" 23 | }, 24 | "headers": { 25 | "Content-Length": "152", 26 | "Content-Type": "application/json; charset=UTF-8", 27 | "Date": "Sat, 21 Jan 2017 14:04:18 GMT", 28 | "Proxy-Connection": "keep-alive", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647", 30 | "X-Frame-Options": "SAMEORIGIN" 31 | }, 32 | "status": { 33 | "code": 200, 34 | "message": "OK" 35 | }, 36 | "url": "/api/v1/user?token=" 37 | } 38 | } 39 | ], 40 | "recorded_with": "betamax/0.5.1" 41 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_09_add__default.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-01-21T14:04:19", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.12.4" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "UTF-8", 22 | "string": "{\"id\":3,\"login\":\"\",\"full_name\":\"\",\"email\":\"guyzmo@gogs.loopback\",\"avatar_url\":\"/avatars/3\",\"username\":\"\"}" 23 | }, 24 | "headers": { 25 | "Content-Length": "152", 26 | "Content-Type": "application/json; charset=UTF-8", 27 | "Date": "Sat, 21 Jan 2017 14:04:19 GMT", 28 | "Proxy-Connection": "keep-alive", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647", 30 | "X-Frame-Options": "SAMEORIGIN" 31 | }, 32 | "status": { 33 | "code": 200, 34 | "message": "OK" 35 | }, 36 | "url": "/api/v1/user?token=" 37 | } 38 | } 39 | ], 40 | "recorded_with": "betamax/0.5.1" 41 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_10_add__default_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-01-21T14:04:20", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.12.4" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "UTF-8", 22 | "string": "{\"id\":3,\"login\":\"\",\"full_name\":\"\",\"email\":\"guyzmo@gogs.loopback\",\"avatar_url\":\"/avatars/3\",\"username\":\"\"}" 23 | }, 24 | "headers": { 25 | "Content-Length": "152", 26 | "Content-Type": "application/json; charset=UTF-8", 27 | "Date": "Sat, 21 Jan 2017 14:04:20 GMT", 28 | "Proxy-Connection": "keep-alive", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647", 30 | "X-Frame-Options": "SAMEORIGIN" 31 | }, 32 | "status": { 33 | "code": 200, 34 | "message": "OK" 35 | }, 36 | "url": "/api/v1/user?token=" 37 | } 38 | } 39 | ], 40 | "recorded_with": "betamax/0.5.1" 41 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_11_add__alone_default.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-01-21T14:04:20", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.12.4" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "UTF-8", 22 | "string": "{\"id\":3,\"login\":\"\",\"full_name\":\"\",\"email\":\"guyzmo@gogs.loopback\",\"avatar_url\":\"/avatars/3\",\"username\":\"\"}" 23 | }, 24 | "headers": { 25 | "Content-Length": "152", 26 | "Content-Type": "application/json; charset=UTF-8", 27 | "Date": "Sat, 21 Jan 2017 14:04:20 GMT", 28 | "Proxy-Connection": "keep-alive", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647", 30 | "X-Frame-Options": "SAMEORIGIN" 31 | }, 32 | "status": { 33 | "code": 200, 34 | "message": "OK" 35 | }, 36 | "url": "/api/v1/user?token=" 37 | } 38 | } 39 | ], 40 | "recorded_with": "betamax/0.5.1" 41 | } -------------------------------------------------------------------------------- /tests/integration/cassettes/test_gogs_test_12_add__alone_default_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "recorded_at": "2017-01-21T14:04:21", 5 | "request": { 6 | "body": { 7 | "encoding": "utf-8", 8 | "string": "" 9 | }, 10 | "headers": { 11 | "Accept": "*/*", 12 | "Accept-Encoding": "identity", 13 | "Connection": "keep-alive", 14 | "User-Agent": "python-requests/2.12.4" 15 | }, 16 | "method": "GET", 17 | "uri": "/api/v1/user?token=" 18 | }, 19 | "response": { 20 | "body": { 21 | "encoding": "UTF-8", 22 | "string": "{\"id\":3,\"login\":\"\",\"full_name\":\"\",\"email\":\"guyzmo@gogs.loopback\",\"avatar_url\":\"/avatars/3\",\"username\":\"\"}" 23 | }, 24 | "headers": { 25 | "Content-Length": "152", 26 | "Content-Type": "application/json; charset=UTF-8", 27 | "Date": "Sat, 21 Jan 2017 14:04:21 GMT", 28 | "Proxy-Connection": "keep-alive", 29 | "Set-Cookie": "lang=en-US; Path=/; Max-Age=2147483647", 30 | "X-Frame-Options": "SAMEORIGIN" 31 | }, 32 | "status": { 33 | "code": 200, 34 | "message": "OK" 35 | }, 36 | "url": "/api/v1/user?token=" 37 | } 38 | } 39 | ], 40 | "recorded_with": "betamax/0.5.1" 41 | } -------------------------------------------------------------------------------- /tests/integration/data/a_directory/random-fortune-1.txt: -------------------------------------------------------------------------------- 1 | No one can guarantee the actions of another. 2 | -- Spock, "Day of the Dove", stardate unknown 3 | -------------------------------------------------------------------------------- /tests/integration/data/a_directory/random-fortune-2.txt: -------------------------------------------------------------------------------- 1 | I'm having BEAUTIFUL THOUGHTS about the INSIPID WIVES of smug and 2 | wealthy CORPORATE LAWYERS ... 3 | -------------------------------------------------------------------------------- /tests/integration/data/a_directory/random-fortune-3.txt: -------------------------------------------------------------------------------- 1 | All wars are civil wars, because all men are brothers ... Each one owes 2 | infinitely more to the human race than to the particular country in 3 | which he was born. 4 | -- Francois Fenelon 5 | -------------------------------------------------------------------------------- /tests/integration/data/a_directory/random-fortune-4.txt: -------------------------------------------------------------------------------- 1 | "The lawgiver, of all beings, most owes the law allegiance. 2 | He of all men should behave as though the law compelled him. 3 | But it is the universal weakness of mankind that what we are 4 | given to administer we presently imagine we own." 5 | -- H. G. Wells 6 | -------------------------------------------------------------------------------- /tests/integration/data/random-fortune-1.txt: -------------------------------------------------------------------------------- 1 | Your best consolation is the hope that the things you failed to get weren't 2 | really worth having. 3 | -------------------------------------------------------------------------------- /tests/integration/data/random-fortune-2.txt: -------------------------------------------------------------------------------- 1 | Spectacularism: 2 | A fascination with extreme situations. 3 | -- Douglas Coupland, "Generation X: Tales for an Accelerated 4 | Culture" 5 | -------------------------------------------------------------------------------- /tests/integration/data/random-fortune-3.txt: -------------------------------------------------------------------------------- 1 | You may be right, I may be crazy, 2 | But it just may be a lunatic you're looking for! 3 | -- Billy Joel 4 | -------------------------------------------------------------------------------- /tests/integration/data/random-fortune-4.txt: -------------------------------------------------------------------------------- 1 | It's hard to tune heavily tuned code. :-) 2 | -- Larry Wall in <199801141725.JAA07555@wall.org> 3 | -------------------------------------------------------------------------------- /tests/integration/local/gitbucket/README.md: -------------------------------------------------------------------------------- 1 | ## Steps to running GitBucket 2 | 3 | - download gitbucket.war from https://github.com/gitbucket/gitbucket/releases. (tested version is 4.12) 4 | - run `java -jar gitbucket.war` 5 | - It listen on 8080 port. 6 | - It creates data directory to ~/.gitbucket 7 | - There is only admin user by id:root / pw:root 8 | 9 | ## Steps to initialize GitBucket data. 10 | 11 | - run `python3 init.py` 12 | -------------------------------------------------------------------------------- /tests/integration/local/gitbucket/init.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # coding: utf-8 3 | 4 | import requests 5 | 6 | base_url = 'http://localhost:8080' 7 | 8 | s = requests.Session() 9 | 10 | # Sign in 11 | s.get(base_url + '/signin?redirect=%2F') 12 | s.post(base_url + '/signin', data={"userName": "root", "password": "root"}) 13 | 14 | # start ssh server 15 | system_data = { 16 | "baseUrl": "http://localhost:8080", 17 | "information": "", 18 | "allowAccountRegistration": "false", 19 | "isCreateRepoOptionPublic": "true", 20 | "allowAnonymousAccess": "true", 21 | "activityLogLimit": "", 22 | "ssh": "on", 23 | "sshHost": "localhost", 24 | "sshPort": "29418", 25 | } 26 | s.post(base_url + '/admin/system', data=system_data) 27 | 28 | # create test user 29 | user_data = { 30 | "userName": "git-repo-user", 31 | "password": "user", 32 | "fullName": "git-repo-user", 33 | "mailAddress": "user@localhost" 34 | } 35 | s.post(base_url + '/admin/users/_newuser', data=user_data) 36 | 37 | # create root repo 38 | repo_data = { 39 | "owner": "root", 40 | "name": "repo", 41 | "description": "", 42 | "isPrivate": "false", 43 | "createReadme": "on" 44 | } 45 | s.post(base_url + '/new', data=repo_data) 46 | 47 | # sign out 48 | s.get(base_url + '/signout') 49 | 50 | # sign in by user 51 | s.get(base_url + '/signin?redirect=%2F') 52 | s.post(base_url + '/signin', data={"userName": "git-repo-user", "password": "user"}) 53 | 54 | # create group 55 | group_data ={ 56 | "groupName": "group", 57 | "description": "", 58 | "memberName": "git-repo-user", 59 | "members": "git-repo-user:true" 60 | } 61 | s.post(base_url + '/groups/new', data=group_data) 62 | 63 | # create Token 64 | ret = s.post(base_url + '/git-repo-user/_personalToken', data={"note": "for test"}) 65 | html = ret.content.decode("utf-8") 66 | find_text = "data-clipboard-text=" 67 | idx = html.find(find_text) + len(find_text) + 1 68 | token = html[idx:idx + 40] 69 | 70 | print("PRIVATE_KEY_GITBUCKET={}".format(token)) 71 | 72 | -------------------------------------------------------------------------------- /tests/integration/local/gogs/README.md: -------------------------------------------------------------------------------- 1 | ## Steps to re-create test environment 2 | 3 | * `cd /tests/integration/local/gogs` 4 | * `./init_conf.sh` # this will change `custom/conf/app.ini` as repository/ROOT must be full path 5 | * `/gogs web --config custom/conf/app.ini` # run with local config. Gitea also supported 6 | * `./init.sh` # this will create users, organizations and repositories required for testing. Server must be completely started (listeninig) 7 | 8 | Under Windows cygwin bash required for scripts (mingw/msys not tested). 9 | 10 | ## Steps to setup test parameters 11 | 12 | * `export PRIVATE_KEY_GOGS=...` # value printed by `init.sh` script 13 | * `GOGS_NAMESPACE=git-repo-test` 14 | * `GOGS_URL=http://127.0.0.1:3000` 15 | -------------------------------------------------------------------------------- /tests/integration/local/gogs/custom/conf/app.ini: -------------------------------------------------------------------------------- 1 | APP_NAME = git-repo gogs test 2 | RUN_USER = git 3 | RUN_MODE = prod 4 | 5 | [repository] 6 | ROOT = gogs-repositories 7 | 8 | [database] 9 | DB_TYPE = sqlite3 10 | HOST = 127.0.0.1:3306 11 | NAME = gogs 12 | USER = root 13 | PASSWD = 14 | SSL_MODE = true 15 | PATH = data/gogs.db 16 | 17 | [server] 18 | DOMAIN = 127.0.0.1 19 | PROTOCOL = http 20 | HTTP_ADDR = 127.0.0.1 21 | HTTP_PORT = 3000 22 | ROOT_URL = http://127.0.0.1:3000/ 23 | DISABLE_SSH = false 24 | START_SSH_SERVER = true 25 | SSH_PORT = 3022 26 | OFFLINE_MODE = true 27 | 28 | [mailer] 29 | ENABLED = false 30 | 31 | [service] 32 | REGISTER_EMAIL_CONFIRM = false 33 | ENABLE_NOTIFY_MAIL = false 34 | DISABLE_REGISTRATION = true 35 | ENABLE_CAPTCHA = false 36 | REQUIRE_SIGNIN_VIEW = false 37 | 38 | [picture] 39 | DISABLE_GRAVATAR = false 40 | ENABLE_FEDERATED_AVATAR = false 41 | 42 | [session] 43 | PROVIDER = file 44 | 45 | [log] 46 | MODE = file 47 | LEVEL = Info 48 | ROOT_PATH = log 49 | 50 | [security] 51 | INSTALL_LOCK = true 52 | 53 | [attachment] 54 | ENABLED = true 55 | PATH = private 56 | ALLOWED_TYPES = */* 57 | -------------------------------------------------------------------------------- /tests/integration/local/gogs/init_conf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ `uname -o` == Cygwin ]] ; then 3 | GOGS_ROOT=$(cmd /c cd|dos2unix)'\gogs-repositories' 4 | else 5 | GOGS_ROOT=$(pwd)'/gogs-repositories' 6 | fi 7 | python3 -c "import sys;from configparser import RawConfigParser;from six.moves import cStringIO;C=type('C',(RawConfigParser,),dict(optionxform=lambda s,o:o));c=C();c.read_string('[APP]\n'+open('custom/conf/app.ini').read());gogsroot=sys.argv[1].replace('\\\\','/');[lambda:0,sys.exit][c.get('repository','ROOT')==gogsroot]();f=cStringIO();c.set('repository','ROOT',gogsroot);print(c.get('repository','ROOT'));c.write(f);open('custom/conf/app.ini','w').write(f.getvalue().replace('[APP]\n',''))" "$GOGS_ROOT" 8 | -------------------------------------------------------------------------------- /tests/integration/test_gerrit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import logging 4 | 5 | ################################################################################# 6 | # Enable logging 7 | 8 | log = logging.getLogger('test.gerrit') 9 | 10 | ################################################################################# 11 | 12 | from tests.helpers import GitRepoTestCase 13 | 14 | from git_repo.services.service import gerrit 15 | 16 | class Test_Gerrit(GitRepoTestCase): 17 | log = log 18 | 19 | def get_service(self): 20 | return gerrit.GerritService(c={ 21 | '__name__': 'gitrepo "gerrithub"', 22 | 'fqdn': 'review.gerrithub.io', 23 | 'username': 'TestUser', 24 | 'token': 'test_token' 25 | }) 26 | 27 | def get_requests_session(self): 28 | return self.service.session 29 | 30 | def test_00_clone(self): 31 | self.action_clone(namespace='TestUser', 32 | repository='DemoRepository') 33 | 34 | def test_01_review(self): 35 | self.action_request_create_by_push(namespace='TestUser', 36 | repository='DemoRepository', 37 | branch='master', 38 | remote_ref='refs/for/master') 39 | 40 | def test_02_fetch_patchset(self): 41 | self.action_request_fetch(namespace='TestUser', 42 | repository='DemoRepository', 43 | request='392089', 44 | remote_ref='refs/changes/89/392089/2', 45 | local_ref='requests/gerrithub/392089') 46 | 47 | def test_03_fetch_patchset__patchset(self): 48 | self.action_request_fetch(namespace='TestUser', 49 | repository='DemoRepository', 50 | request='392089/1', 51 | remote_ref='refs/changes/89/392089/1', 52 | local_ref='requests/gerrithub/392089') 53 | 54 | def test_04_fetch_patchset__full(self): 55 | self.action_request_fetch(namespace='TestUser', 56 | repository='DemoRepository', 57 | request='refs/changes/08/391808/2', 58 | remote_ref='refs/changes/08/391808/2', 59 | local_ref='requests/gerrithub/391808') 60 | 61 | def test_05_fetch_patchset__change_id(self): 62 | self.action_request_fetch(namespace='TestUser', 63 | repository='DemoRepository', 64 | request='I873f1207d6', 65 | remote_ref='refs/changes/89/392089/2', 66 | local_ref='requests/gerrithub/392089') 67 | 68 | def test_06_list_patchsets(self): 69 | self.action_request_list( 70 | namespace='TestUser', 71 | repository='DemoRepository', 72 | rq_list_data=[ 73 | '{} {} {:<60} {}', 74 | ['id', 'branch', 'subject', 'url'], 75 | [392074, 'master', 'Commit-24', 'https://review.gerrithub.io/392074'], 76 | [392073, 'master', 'Commit-23', 'https://review.gerrithub.io/392073'], 77 | [392072, 'master', 'Commit-22', 'https://review.gerrithub.io/392072'] 78 | ]) 79 | 80 | def test_07_add(self): 81 | self.action_add(namespace='TestUser', 82 | repository='AnotherRepository') 83 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | # Tox (http://tox.testrun.org/) is a tool for running tests 2 | # in multiple virtualenvs. This configuration file will run the 3 | # test suite on all supported python versions. To use it, "pip install tox" 4 | # and then run "tox" from this directory. 5 | 6 | [tox] 7 | envlist = 8 | py35 9 | # docs 10 | 11 | [testenv] 12 | commands = 13 | nosetests [] 14 | pyflakes git_repo 15 | pep8 --ignore E701,E241,E231,E501,E127,E126 git_repo 16 | deps = 17 | nose 18 | pyflakes 19 | pep8 20 | coverage 21 | nose-cover3 22 | 23 | [testenv:docs] 24 | basepython = python3 25 | changedir = docs 26 | deps = 27 | sphinx 28 | sphinx_rtd_theme 29 | commands = 30 | sphinx-build -W -c docs/ -b html -d {envtmpdir}/doctrees . {envtmpdir}/html 31 | --------------------------------------------------------------------------------