From 5bebbc340609adabf1f06bf6006fbcb2795b2cb0 Mon Sep 17 00:00:00 2001 From: Guyzmo Date: Mon, 28 Nov 2016 15:53:29 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=80=20Switched=20to=20python-bitbu?= =?UTF-8?q?cket=20from=20defunct=20bitbucket-api=20lib?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🚧 switch implementation * 🚧 updated tests * 📼 updated cassettes * ⚠️ missing Fork implementation Signed-off-by: Guyzmo --- git_repo/repo.py | 4 +- git_repo/services/ext/bitbucket.py | 164 ++++++------------ requirements.txt | 2 +- .../test_bitbucket_test_00_fork.json | 97 +---------- .../test_bitbucket_test_01_create.json | 96 +--------- .../test_bitbucket_test_02_delete.json | 95 +--------- .../test_bitbucket_test_03_delete_nouser.json | 95 +--------- .../test_bitbucket_test_04_clone.json | 50 +----- .../cassettes/test_bitbucket_test_05_add.json | 50 +----- .../test_bitbucket_test_06_add__name.json | 50 +----- .../test_bitbucket_test_07_add__alone.json | 50 +----- ...est_bitbucket_test_08_add__alone_name.json | 50 +----- .../test_bitbucket_test_09_add__default.json | 50 +----- ...t_bitbucket_test_10_add__default_name.json | 50 +----- ..._bitbucket_test_11_add__alone_default.json | 50 +----- ...ucket_test_12_add__alone_default_name.json | 50 +----- tests/integration/test_bitbucket.py | 8 +- 17 files changed, 84 insertions(+), 927 deletions(-) diff --git a/git_repo/repo.py b/git_repo/repo.py index 7432827..f8bc6d2 100644 --- a/git_repo/repo.py +++ b/git_repo/repo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env pytho ''' Usage: @@ -134,7 +134,7 @@ print('Please use with python version 3') sys.exit(1) -from .exceptions import ArgumentError +from .exceptions import ArgumentError, ResourceNotFoundError from .services.service import RepositoryService from .kwargparse import KeywordArgumentParser, store_parameter, register_action diff --git a/git_repo/services/ext/bitbucket.py b/git_repo/services/ext/bitbucket.py index a23ef7c..9c6e25d 100644 --- a/git_repo/services/ext/bitbucket.py +++ b/git_repo/services/ext/bitbucket.py @@ -6,88 +6,20 @@ from ..service import register_target, RepositoryService from ...exceptions import ResourceError, ResourceExistsError, ResourceNotFoundError -import bitbucket.bitbucket as bitbucket +from pybitbucket.bitbucket import Client +from pybitbucket.auth import BasicAuthenticator +from pybitbucket.user import User +from pybitbucket.repository import Repository, RepositoryForkPolicy + from requests import Request, Session +from requests.exceptions import HTTPError import json -''' -Extension of the bitbucket module implementation to add support for the extra -features the original implementation lacked. This is a temporary measure, up -until a PR is crafted for the original code. -''' - -bitbucket.URLS.update({ - 'GET_REPO' : 'repositories/%(username)s/%(repo_slug)s/', - 'DELETE_REPO' : 'repositories/%(accountname)s/%(repo_slug)s', - 'FORK_REPO' : 'repositories/%(username)s/%(repo_slug)s/fork', -}) - -class Bitbucket(bitbucket.Bitbucket): - def __init__(self, *args, **kwarg): - super(Bitbucket, self).__init__(self) - self.session = Session() - # XXX monkey patching of requests within bitbucket module - self.requests = self.session - - def get(self, user=None, repo_slug=None): - """ Get a single repository on Bitbucket and return it.""" - username = user or self.username - repo_slug = repo_slug or self.repo_slug or '' - url = self.url('GET_REPO', username=username, repo_slug=repo_slug) - return self.dispatch('GET', url, auth=self.auth) - - def delete(self, user, repo_slug): - url = self.url('DELETE_REPO', username=user, accountname=user, repo_slug=repo_slug) - return self.dispatch('DELETE', url, auth=self.auth) - - def fork(self, user, repo_slug, new_name=None): - url = self.url('FORK_REPO', username=user, repo_slug=repo_slug) - new_repo = new_name or repo_slug - return self.dispatch('POST', url, name=new_repo, auth=self.auth) - - def dispatch(self, method, url, auth=None, params=None, **kwargs): - """ Send HTTP request, with given method, - credentials and data to the given URL, - and return the success and the result on success. - """ - r = Request( - method=method, - url=url, - auth=auth, - params=params, - data=kwargs) - resp = self.session.send(r.prepare()) - status = resp.status_code - text = resp.text - error = resp.reason - if status >= 200 and status < 300: - if text: - try: - return (True, json.loads(text)) - except TypeError: - pass - except ValueError: - pass - return (True, text) - elif status >= 300 and status < 400: - return ( - False, - 'Unauthorized access, ' - 'please check your credentials.') - elif status == 404: - return (False, dict(message='Service not found', reason=error, code=status)) - elif status == 400: - return (False, dict(message='Bad request sent to server.', reason=error, code=status)) - elif status == 401: - return (False, dict(message='Not enough privileges.', reason=error, code=status)) - elif status == 403: - return (False, dict(message='Not authorized.', reason=error, code=status)) - elif status == 402 or status >= 405: - return (False, dict(message='Request error.', reason=error, code=status)) - elif status >= 500 and status < 600: - return (False, dict(message='Server error.', reason=error, code=status)) - else: - return (False, dict(message='Unidentified error.', reason=error, code=status)) +# bitbucket.URLS.update({ +# 'GET_REPO' : 'repositories/%(username)s/%(repo_slug)s/', +# 'DELETE_REPO' : 'repositories/%(accountname)s/%(repo_slug)s', +# 'FORK_REPO' : 'repositories/%(username)s/%(repo_slug)s/fork', +# }) @register_target('bb', 'bitbucket') @@ -95,7 +27,7 @@ class BitbucketService(RepositoryService): fqdn = 'bitbucket.org' def __init__(self, *args, **kwarg): - self.bb = Bitbucket() + self.bb = Client() super(BitbucketService, self).__init__(*args, **kwarg) def connect(self): @@ -103,47 +35,51 @@ def connect(self): raise ConnectionError('Could not connect to BitBucket. Please configure .gitconfig with your bitbucket credentials.') if not ':' in self._privatekey: raise ConnectionError('Could not connect to BitBucket. Please setup your private key with login:password') - self.bb.username, self.bb.password = self._privatekey.split(':') - self.username = self.bb.username - result, _ = self.bb.get_user() - if not result: - raise ConnectionError('Could not connect to BitBucket. Not authorized, wrong credentials.') + self.bb.config = BasicAuthenticator(*self._privatekey.split(':')+['z+git-repo+pub@m0g.net']) + self.bb.session = self.bb.config.session + try: + User.find_current_user(client=self.bb) + except HTTPError as err: + raise ConnectionError('Could not connect to BitBucket. Not authorized, wrong credentials.') from err def create(self, user, repo, add=False): - success, result = self.bb.repository.create(repo, scm='git', public=True) - if not success and result['code'] == 400: - raise ResourceExistsError('Project {} already exists on this account.'.format(repo)) - elif not success: - raise ResourceError("Couldn't complete creation: {message} (error #{code}: {reason})".format(**result)) - if add: - self.add(user=user, repo=repo, tracking=self.name) + try: + repo = Repository.create( + repo, + fork_policy=RepositoryForkPolicy.ALLOW_FORKS, + is_private=False, + client=self.bb + ) + if add: + self.add(user=user, repo=repo, tracking=self.name) + except HTTPError as err: + if err.status_code == 400: + raise ResourceExistsError('Project {} already exists on this account.'.format(repo)) from err + raise ResourceError("Couldn't complete creation: {}".format(err)) from err def fork(self, user, repo): - success, result = self.bb.fork(user, repo) - if not success: - raise ResourceError("Couldn't complete fork: {message} (error #{code}: {reason})".format(**result)) + raise NotImplementedError('No support yet by the underlying library.') + try: + Repository.find_repository_by_name_and_owner(repo, owner=user, client=self.bb).fork() + except HTTPError as err: + raise ResourceError("Couldn't complete creation: {}".format(err)) from err return '/'.join([result['owner'], result['slug']]) def delete(self, repo, user=None): if not user: user = self.user - success, result = self.bb.delete(user, repo) - if not success and result['code'] == 404: - raise ResourceNotFoundError("Cannot delete: repository {}/{} does not exists.".format(user, repo)) - elif not success: - raise ResourceError("Couldn't complete deletion: {message} (error #{code}: {reason})".format(**result)) + try: + Repository.find_repository_by_name_and_owner(repo, owner=user, client=self.bb).delete() + except HTTPError as err: + if err.status_code == 404: + raise ResourceNotFoundError("Cannot delete: repository {}/{} does not exists.".format(user, repo)) from err + raise ResourceError("Couldn't complete creation: {}".format(err)) from err def get_repository(self, user, repo): - if user != self.user: - result, repo_list = self.bb.repository.public(user) - else: - result, repo_list = self.bb.repository.all() - if not result: - raise ResourceError("Couldn't list repositories: {message} (error #{code}: {reason})".format(**repo_list)) - for r in repo_list: - if r['name'] == repo: - return r - #raise ResourceNotFoundError('Cannot retrieve repository: {}/{} does not exists.'.format(user, repo)) + try: + return Repository.find_repository_by_name_and_owner(repo, owner=user, client=self.bb) + except HTTPError as err: + raise ResourceNotFoundError('Cannot retrieve repository: {}/{} does not exists.'.format(user, repo)) @classmethod def get_auth_token(cls, login, password, prompt=None): @@ -152,9 +88,9 @@ def get_auth_token(cls, login, password, prompt=None): @property def user(self): - ret, user = self.bb.get_user() - if ret: - return user['username'] - raise ResourceError("Could not retrieve username: {message} (error #{code}: {reason}".format(**result)) + try: + return User.find_current_user(client=self.bb).username + except HTTPError as err: + raise ResourceError("Couldn't complete creation: {}".format(err)) from err diff --git a/requirements.txt b/requirements.txt index 0bab162..7f3e2d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ GitPython>=2.1.0 uritemplate.py==2.0.0 github3.py==0.9.5 python-gitlab>=0.13 -bitbucket-api +pybitbucket>=0.11.1 diff --git a/tests/integration/cassettes/test_bitbucket_test_00_fork.json b/tests/integration/cassettes/test_bitbucket_test_00_fork.json index e36e32b..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_00_fork.json +++ b/tests/integration/cassettes/test_bitbucket_test_00_fork.json @@ -1,97 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-09-11T20:32:29", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-09-11T20:39:01.932\", \"no_forks\": false, \"created_on\": \"2016-09-11T20:39:01.836\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//github3.py/avatar/32/?ts=1473619141\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 5706942, \"read_only\": false, \"fork_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2014-04-25T03:03:01.439\", \"no_forks\": null, \"created_on\": \"2012-06-21T19:12:24.702\", \"owner\": \"icordasc\", \"logo\": \"https://bitbucket.org/icordasc/github3.py/avatar/32/?ts=1398387781\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 5741827, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2012-06-21 17:12:24+00:00\", \"website\": \"http://github3py.rtfd.org/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"github3.py\", \"is_private\": false, \"name\": \"github3.py\", \"language\": \"python\", \"utc_last_updated\": \"2014-04-25 01:03:01+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/icordasc/github3.py\"}, \"mq_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2014-04-25T03:03:01.439\", \"no_forks\": null, \"created_on\": \"2012-06-21T19:12:24.702\", \"owner\": \"icordasc\", \"logo\": \"https://bitbucket.org/icordasc/github3.py/avatar/32/?ts=1398387781\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 5741827, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2012-06-21 17:12:24+00:00\", \"website\": \"http://github3py.rtfd.org/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"github3.py\", \"is_private\": false, \"name\": \"github3.py\", \"language\": \"python\", \"utc_last_updated\": \"2014-04-25 01:03:01+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/icordasc/github3.py\"}, \"state\": \"available\", \"utc_created_on\": \"2016-09-11 18:39:01+00:00\", \"website\": null, \"description\": \"\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"github3.py\", \"is_private\": false, \"name\": \"github3.py\", \"language\": \"python\", \"utc_last_updated\": \"2016-09-11 18:39:01+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//github3.py\"}, {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-06-21T22:52:15.524\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1466542335\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2785235, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-06-21 20:52:15+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"Bernard\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1473615876\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "keep-alive", - "Content-Language": "en", - "Content-Length": "9882", - "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 11 Sep 2016 20:32:29 GMT", - "ETag": "\"2ad5facd90f2f0494d3a91363ccfce0e\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "caching", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.022145986557", - "X-Request-Count": "161", - "X-Served-By": "app-104", - "X-Static-Version": "0c55837759e5", - "X-Version": "0c55837759e5" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - }, - { - "recorded_at": "2016-09-11T20:32:29", - "request": { - "body": { - "encoding": "utf-8", - "string": "name=git_tutorial" - }, - "headers": { - "Authorization": "Basic Z3V5em1vOkpKNHRsNHNzMTRuLmMwbQ==", - "Content-Length": "17", - "Content-Type": "application/x-www-form-urlencoded" - }, - "method": "POST", - "uri": "https://bitbucket.org/!api/1.0/repositories/abdo2015/git_tutorial/fork" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-09-11T22:32:29.722\", \"no_forks\": false, \"created_on\": \"2016-09-11T22:32:29.669\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git_tutorial/avatar/32/?ts=1473625949\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 0, \"read_only\": false, \"fork_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"mq_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"state\": \"creating\", \"utc_created_on\": \"2016-09-11 20:32:29+00:00\", \"website\": null, \"description\": \"\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2016-09-11 20:32:29+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git_tutorial\"}" - }, - "headers": { - "Connection": "keep-alive", - "Content-Language": "en", - "Content-Length": "2213", - "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 11 Sep 2016 20:32:29 GMT", - "ETag": "\"10a902087736b899fff36d2c79f29685\"", - "Server": "nginx/1.6.2", - "Set-Cookie": "use_aid=true; httponly; Path=/; secure", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie", - "X-Accepted-OAuth-Scopes": "repository:admin", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.208966016769", - "X-Request-Count": "64", - "X-Served-By": "app-106", - "X-Static-Version": "0c55837759e5", - "X-Version": "0c55837759e5" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/repositories/abdo2015/git_tutorial/fork" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_01_create.json b/tests/integration/cassettes/test_bitbucket_test_01_create.json index 8600884..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_01_create.json +++ b/tests/integration/cassettes/test_bitbucket_test_01_create.json @@ -1,96 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:12:58", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T23:13:05.996\", \"no_forks\": false, \"created_on\": \"2016-03-30T23:13:05.893\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git_tutorial/avatar/32/?ts=1459372385\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 62738, \"read_only\": false, \"fork_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"mq_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"state\": \"available\", \"utc_created_on\": \"2016-03-30 21:13:05+00:00\", \"website\": null, \"description\": \"\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2016-03-30 21:13:05+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git_tutorial\"}, {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459372152\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "keep-alive", - "Content-Language": "en", - "Content-Length": "9911", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:13:11 GMT", - "ETag": "\"862700de7006cb9236495a280880bcd7\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "caching", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.0331559181213", - "X-Request-Count": "433", - "X-Served-By": "app-104", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - }, - { - "recorded_at": "2016-03-30T21:12:58", - "request": { - "body": { - "encoding": "utf-8", - "string": "is_private=True&scm=git&name=foobar&public=True" - }, - "headers": { - "Authorization": "Basic Z3V5em1vOndtY2VsaW5l", - "Content-Length": "47", - "Content-Type": "application/x-www-form-urlencoded" - }, - "method": "POST", - "uri": "https://bitbucket.org/!api/1.0/repositories/" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T23:13:12.033\", \"no_forks\": false, \"forks_count\": 0, \"created_on\": \"2016-03-30T23:13:11.956\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//foobar/avatar/32/?ts=1459372392\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 0, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"creating\", \"utc_created_on\": \"2016-03-30 21:13:11+00:00\", \"website\": \"\", \"description\": \"\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"foobar\", \"is_private\": true, \"name\": \"foobar\", \"language\": \"\", \"utc_last_updated\": \"2016-03-30 21:13:12+00:00\", \"no_public_forks\": true, \"creator\": null, \"resource_uri\": \"/1.0/repositories//foobar\"}" - }, - "headers": { - "Connection": "keep-alive", - "Content-Language": "en", - "Content-Length": "704", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:13:12 GMT", - "ETag": "\"d2c6868621739da28430ba26a0ab4493\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie", - "X-Accepted-OAuth-Scopes": "repository:admin", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.29775595665", - "X-Request-Count": "322", - "X-Served-By": "app-106", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/repositories/" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_02_delete.json b/tests/integration/cassettes/test_bitbucket_test_02_delete.json index b02fb7e..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_02_delete.json +++ b/tests/integration/cassettes/test_bitbucket_test_02_delete.json @@ -1,95 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:12:59", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T23:13:05.996\", \"no_forks\": false, \"created_on\": \"2016-03-30T23:13:05.893\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git_tutorial/avatar/32/?ts=1459372385\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 62738, \"read_only\": false, \"fork_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"mq_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"state\": \"available\", \"utc_created_on\": \"2016-03-30 21:13:05+00:00\", \"website\": null, \"description\": \"\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2016-03-30 21:13:05+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git_tutorial\"}, {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459372152\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "Keep-Alive", - "Content-Language": "en", - "Content-Length": "9911", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:13:11 GMT", - "ETag": "\"862700de7006cb9236495a280880bcd7\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "cached", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.0331559181213", - "X-Request-Count": "433", - "X-Served-By": "app-104", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - }, - { - "recorded_at": "2016-03-30T21:12:59", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": { - "Authorization": "Basic Z3V5em1vOndtY2VsaW5l", - "Content-Length": "0" - }, - "method": "DELETE", - "uri": "https://bitbucket.org/!api/1.0/repositories//foobar/" - }, - "response": { - "body": { - "encoding": "ISO-8859-1", - "string": "" - }, - "headers": { - "Connection": "keep-alive", - "Content-Language": "en", - "Content-Length": "0", - "Content-Type": "text/plain", - "Date": "Wed, 30 Mar 2016 21:13:13 GMT", - "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie", - "X-Accepted-OAuth-Scopes": "repository:admin", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.199115991592", - "X-Request-Count": "421", - "X-Served-By": "app-107", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 204, - "message": "NO CONTENT" - }, - "url": "https://bitbucket.org/!api/1.0/repositories//foobar/" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_03_delete_nouser.json b/tests/integration/cassettes/test_bitbucket_test_03_delete_nouser.json index 5f1e6e9..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_03_delete_nouser.json +++ b/tests/integration/cassettes/test_bitbucket_test_03_delete_nouser.json @@ -1,95 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:13:05", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-29T18:01:17.172\", \"no_forks\": false, \"created_on\": \"2016-03-29T18:01:16.965\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git_tutorial/avatar/32/?ts=1459267277\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 62738, \"read_only\": false, \"fork_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"mq_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"state\": \"available\", \"utc_created_on\": \"2016-03-29 16:01:16+00:00\", \"website\": null, \"description\": \"\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2016-03-29 16:01:17+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git_tutorial\"}, {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459263786\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "Keep-Alive", - "Content-Language": "en", - "Content-Length": "9911", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:09:12 GMT", - "ETag": "\"cd6fa2bad5e9cf8c641a34f32601edcb\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "cached", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.0491111278534", - "X-Request-Count": "177", - "X-Served-By": "app-106", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - }, - { - "recorded_at": "2016-03-30T21:13:05", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": { - "Authorization": "Basic Z3V5em1vOndtY2VsaW5l", - "Content-Length": "0" - }, - "method": "DELETE", - "uri": "https://bitbucket.org/!api/1.0/repositories//git_tutorial/" - }, - "response": { - "body": { - "encoding": "ISO-8859-1", - "string": "" - }, - "headers": { - "Connection": "keep-alive", - "Content-Language": "en", - "Content-Length": "0", - "Content-Type": "text/plain", - "Date": "Wed, 30 Mar 2016 21:13:19 GMT", - "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie", - "X-Accepted-OAuth-Scopes": "repository:admin", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.213027954102", - "X-Request-Count": "99", - "X-Served-By": "app-104", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 204, - "message": "NO CONTENT" - }, - "url": "https://bitbucket.org/!api/1.0/repositories//git_tutorial/" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_04_clone.json b/tests/integration/cassettes/test_bitbucket_test_04_clone.json index 11e5f8b..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_04_clone.json +++ b/tests/integration/cassettes/test_bitbucket_test_04_clone.json @@ -1,50 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:13:06", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-29T18:01:17.172\", \"no_forks\": false, \"created_on\": \"2016-03-29T18:01:16.965\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git_tutorial/avatar/32/?ts=1459267277\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 62738, \"read_only\": false, \"fork_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"mq_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"state\": \"available\", \"utc_created_on\": \"2016-03-29 16:01:16+00:00\", \"website\": null, \"description\": \"\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2016-03-29 16:01:17+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git_tutorial\"}, {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459263786\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "Keep-Alive", - "Content-Language": "en", - "Content-Length": "9911", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:09:12 GMT", - "ETag": "\"cd6fa2bad5e9cf8c641a34f32601edcb\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "cached", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.0491111278534", - "X-Request-Count": "177", - "X-Served-By": "app-106", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_05_add.json b/tests/integration/cassettes/test_bitbucket_test_05_add.json index 8e00296..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_05_add.json +++ b/tests/integration/cassettes/test_bitbucket_test_05_add.json @@ -1,50 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:13:06", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T23:13:05.996\", \"no_forks\": false, \"created_on\": \"2016-03-30T23:13:05.893\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git_tutorial/avatar/32/?ts=1459372385\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 62738, \"read_only\": false, \"fork_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"mq_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"state\": \"available\", \"utc_created_on\": \"2016-03-30 21:13:05+00:00\", \"website\": null, \"description\": \"\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2016-03-30 21:13:05+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git_tutorial\"}, {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459372152\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "Keep-Alive", - "Content-Language": "en", - "Content-Length": "9911", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:13:11 GMT", - "ETag": "\"862700de7006cb9236495a280880bcd7\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "cached", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.0331559181213", - "X-Request-Count": "433", - "X-Served-By": "app-104", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_06_add__name.json b/tests/integration/cassettes/test_bitbucket_test_06_add__name.json index 65bdf39..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_06_add__name.json +++ b/tests/integration/cassettes/test_bitbucket_test_06_add__name.json @@ -1,50 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:13:07", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459372152\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "keep-alive", - "Content-Language": "en", - "Content-Length": "7691", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:13:20 GMT", - "ETag": "\"ba9b8fda927346d69c0458c229f128df\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "caching", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.030996799469", - "X-Request-Count": "464", - "X-Served-By": "app-104", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_07_add__alone.json b/tests/integration/cassettes/test_bitbucket_test_07_add__alone.json index 29f8e48..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_07_add__alone.json +++ b/tests/integration/cassettes/test_bitbucket_test_07_add__alone.json @@ -1,50 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:13:13", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T23:13:05.996\", \"no_forks\": false, \"created_on\": \"2016-03-30T23:13:05.893\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git_tutorial/avatar/32/?ts=1459372385\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 62738, \"read_only\": false, \"fork_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"mq_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"state\": \"available\", \"utc_created_on\": \"2016-03-30 21:13:05+00:00\", \"website\": null, \"description\": \"\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2016-03-30 21:13:05+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git_tutorial\"}, {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459372152\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "Keep-Alive", - "Content-Language": "en", - "Content-Length": "9911", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:13:11 GMT", - "ETag": "\"862700de7006cb9236495a280880bcd7\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "cached", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.0331559181213", - "X-Request-Count": "433", - "X-Served-By": "app-104", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_08_add__alone_name.json b/tests/integration/cassettes/test_bitbucket_test_08_add__alone_name.json index 69bac88..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_08_add__alone_name.json +++ b/tests/integration/cassettes/test_bitbucket_test_08_add__alone_name.json @@ -1,50 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:13:13", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-29T18:01:17.172\", \"no_forks\": false, \"created_on\": \"2016-03-29T18:01:16.965\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git_tutorial/avatar/32/?ts=1459267277\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 62738, \"read_only\": false, \"fork_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"mq_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"state\": \"available\", \"utc_created_on\": \"2016-03-29 16:01:16+00:00\", \"website\": null, \"description\": \"\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2016-03-29 16:01:17+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git_tutorial\"}, {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459263786\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "Keep-Alive", - "Content-Language": "en", - "Content-Length": "9911", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:09:12 GMT", - "ETag": "\"cd6fa2bad5e9cf8c641a34f32601edcb\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "cached", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.0491111278534", - "X-Request-Count": "177", - "X-Served-By": "app-106", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_09_add__default.json b/tests/integration/cassettes/test_bitbucket_test_09_add__default.json index 55b29c5..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_09_add__default.json +++ b/tests/integration/cassettes/test_bitbucket_test_09_add__default.json @@ -1,50 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:13:14", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459372152\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "Keep-Alive", - "Content-Language": "en", - "Content-Length": "7691", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:13:20 GMT", - "ETag": "\"ba9b8fda927346d69c0458c229f128df\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "cached", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.030996799469", - "X-Request-Count": "464", - "X-Served-By": "app-104", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_10_add__default_name.json b/tests/integration/cassettes/test_bitbucket_test_10_add__default_name.json index a5fdae3..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_10_add__default_name.json +++ b/tests/integration/cassettes/test_bitbucket_test_10_add__default_name.json @@ -1,50 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:13:15", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459372152\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "Keep-Alive", - "Content-Language": "en", - "Content-Length": "7691", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:13:20 GMT", - "ETag": "\"ba9b8fda927346d69c0458c229f128df\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "cached", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.030996799469", - "X-Request-Count": "464", - "X-Served-By": "app-104", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_11_add__alone_default.json b/tests/integration/cassettes/test_bitbucket_test_11_add__alone_default.json index a5fdae3..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_11_add__alone_default.json +++ b/tests/integration/cassettes/test_bitbucket_test_11_add__alone_default.json @@ -1,50 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:13:15", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459372152\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "Keep-Alive", - "Content-Language": "en", - "Content-Length": "7691", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:13:20 GMT", - "ETag": "\"ba9b8fda927346d69c0458c229f128df\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "cached", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.030996799469", - "X-Request-Count": "464", - "X-Served-By": "app-104", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/cassettes/test_bitbucket_test_12_add__alone_default_name.json b/tests/integration/cassettes/test_bitbucket_test_12_add__alone_default_name.json index d182c27..ab23762 100644 --- a/tests/integration/cassettes/test_bitbucket_test_12_add__alone_default_name.json +++ b/tests/integration/cassettes/test_bitbucket_test_12_add__alone_default_name.json @@ -1,50 +1,4 @@ { - "http_interactions": [ - { - "recorded_at": "2016-03-30T21:13:16", - "request": { - "body": { - "encoding": "utf-8", - "string": "" - }, - "headers": {}, - "method": "GET", - "uri": "https://bitbucket.org/!api/1.0/users//" - }, - "response": { - "body": { - "encoding": "utf-8", - "string": "{\"repositories\": [{\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-29T18:01:17.172\", \"no_forks\": false, \"created_on\": \"2016-03-29T18:01:16.965\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git_tutorial/avatar/32/?ts=1459267277\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 62738, \"read_only\": false, \"fork_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"mq_of\": {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2015-10-14T12:17:52.926\", \"no_forks\": false, \"created_on\": \"2015-10-13T19:41:25.948\", \"owner\": \"abdo2015\", \"logo\": \"https://bitbucket.org/abdo2015/git_tutorial/avatar/32/?ts=1444817872\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 75295, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2015-10-13 17:41:25+00:00\", \"website\": \"\", \"description\": \"a repository to show git features\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2015-10-14 10:17:52+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/abdo2015/git_tutorial\"}, \"state\": \"available\", \"utc_created_on\": \"2016-03-29 16:01:16+00:00\", \"website\": null, \"description\": \"\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"git_tutorial\", \"is_private\": false, \"name\": \"git_tutorial\", \"language\": \"java\", \"utc_last_updated\": \"2016-03-29 16:01:17+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git_tutorial\"}, {\"scm\": \"git\", \"has_wiki\": false, \"last_updated\": \"2016-03-30T18:10:40.746\", \"no_forks\": false, \"created_on\": \"2016-03-21T20:39:20.064\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//git-repo/avatar/32/?ts=1459354240\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 1254333, \"read_only\": false, \"fork_of\": null, \"mq_of\": null, \"state\": \"available\", \"utc_created_on\": \"2016-03-21 19:39:20+00:00\", \"website\": \"\", \"description\": \" Tool to manage multiple repository services from the git CLI\", \"has_issues\": false, \"is_fork\": false, \"slug\": \"git-repo\", \"is_private\": false, \"name\": \"git-repo\", \"language\": \"python\", \"utc_last_updated\": \"2016-03-30 16:10:40+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//git-repo\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.425\", \"no_forks\": null, \"created_on\": \"2008-11-14T15:29:32.459\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-screen-controller/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3435973, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-14 14:29:32+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"modification of commander so screen receives all new shells and execution outputs.\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-screen-controller\", \"is_private\": false, \"name\": \"pida-screen-controller\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-screen-controller\"}, {\"scm\": \"hg\", \"has_wiki\": false, \"last_updated\": \"2011-09-17T05:11:38.460\", \"no_forks\": null, \"created_on\": \"2008-11-25T16:47:44.505\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida-bugfixing/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 3395341, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-11-25 15:47:44+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"all my bugfixeso\", \"has_issues\": false, \"is_fork\": true, \"slug\": \"pida-bugfixing\", \"is_private\": false, \"name\": \"pida-bugfixing\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida-bugfixing\"}, {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2011-09-17T05:11:38.481\", \"no_forks\": null, \"created_on\": \"2008-10-09T00:15:57.372\", \"owner\": \"\", \"logo\": \"https://bitbucket.org//pida--main/avatar/32/?ts=1316229098\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 2980484, \"read_only\": false, \"fork_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"mq_of\": {\"scm\": \"hg\", \"has_wiki\": true, \"last_updated\": \"2012-03-13T21:10:02.175\", \"no_forks\": null, \"created_on\": \"2008-09-15T16:30:29.672\", \"owner\": \"aafshar\", \"logo\": \"https://bitbucket.org/aafshar/pida-main/avatar/32/?ts=1331669402\", \"email_mailinglist\": \"\", \"is_mq\": false, \"size\": 6158307, \"read_only\": false, \"creator\": null, \"state\": \"available\", \"utc_created_on\": \"2008-09-15 14:30:29+00:00\", \"website\": \"\", \"description\": \"The main PIDA branch\", \"has_issues\": true, \"is_fork\": false, \"slug\": \"pida-main\", \"is_private\": false, \"name\": \"pida-main\", \"language\": \"\", \"utc_last_updated\": \"2012-03-13 20:10:02+00:00\", \"email_writers\": false, \"no_public_forks\": false, \"resource_uri\": \"/1.0/repositories/aafshar/pida-main\"}, \"state\": \"available\", \"utc_created_on\": \"2008-10-08 22:15:57+00:00\", \"website\": \"http://pida.co.uk/\", \"description\": \"\", \"has_issues\": true, \"is_fork\": true, \"slug\": \"pida--main\", \"is_private\": false, \"name\": \"pida--main\", \"language\": \"\", \"utc_last_updated\": \"2011-09-17 03:11:38+00:00\", \"no_public_forks\": false, \"creator\": null, \"resource_uri\": \"/1.0/repositories//pida--main\"}], \"user\": {\"username\": \"\", \"first_name\": \"Bernard\", \"last_name\": \"\", \"display_name\": \"\", \"is_staff\": false, \"avatar\": \"https://bitbucket.org/account//avatar/32/?ts=1459263786\", \"resource_uri\": \"/1.0/users/\", \"is_team\": false}}" - }, - "headers": { - "Accept-Ranges": "bytes", - "Cache-Control": "max-age=900", - "Connection": "Keep-Alive", - "Content-Language": "en", - "Content-Length": "9911", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 30 Mar 2016 21:09:12 GMT", - "ETag": "\"cd6fa2bad5e9cf8c641a34f32601edcb\"", - "Server": "nginx/1.6.2", - "Strict-Transport-Security": "max-age=31536000", - "Vary": "Authorization, Accept-Language, Cookie, Accept-Encoding", - "X-Accepted-OAuth-Scopes": "account", - "X-Cache-Info": "cached", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "X-Render-Time": "0.0491111278534", - "X-Request-Count": "177", - "X-Served-By": "app-106", - "X-Static-Version": "810b89b501d4", - "X-Version": "810b89b501d4" - }, - "status": { - "code": 200, - "message": "OK" - }, - "url": "https://bitbucket.org/!api/1.0/users//" - } - } - ], + "http_interactions": [], "recorded_with": "betamax/0.5.1" -} +} \ No newline at end of file diff --git a/tests/integration/test_bitbucket.py b/tests/integration/test_bitbucket.py index 8026386..3f764a3 100644 --- a/tests/integration/test_bitbucket.py +++ b/tests/integration/test_bitbucket.py @@ -11,6 +11,7 @@ import os import sys +import pytest from tests.helpers import GitRepoTestCase @@ -32,9 +33,10 @@ def get_requests_session(self): return self.service.bb.session def test_00_fork(self): - self.action_fork(local_namespace=self.local_namespace, - remote_namespace='abdo2015', - repository='git_tutorial') + with pytest.raises(NotImplementedError): + self.action_fork(local_namespace=self.local_namespace, + remote_namespace='abdo2015', + repository='git_tutorial') def test_01_create(self): self.action_create(namespace=self.local_namespace, From de64d6b3e6e978e737df748edd49bbe14d15f8be Mon Sep 17 00:00:00 2001 From: Guyzmo Date: Mon, 28 Nov 2016 18:41:44 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=9A=A7=20added=20repository=20list=20?= =?UTF-8?q?feature=20for=20bitbucket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Guyzmo --- git_repo/services/ext/bitbucket.py | 61 ++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/git_repo/services/ext/bitbucket.py b/git_repo/services/ext/bitbucket.py index 9c6e25d..d6083d3 100644 --- a/git_repo/services/ext/bitbucket.py +++ b/git_repo/services/ext/bitbucket.py @@ -75,6 +75,67 @@ def delete(self, repo, user=None): raise ResourceNotFoundError("Cannot delete: repository {}/{} does not exists.".format(user, repo)) from err raise ResourceError("Couldn't complete creation: {}".format(err)) from err + def list(self, user, _long=False): + import shutil, sys + from datetime import datetime + term_width = shutil.get_terminal_size((80, 20)).columns + def col_print(lines, indent=0, pad=2): + # prints a list of items in a fashion similar to the dir command + # borrowed from https://gist.github.com/critiqjo/2ca84db26daaeb1715e1 + n_lines = len(lines) + if n_lines == 0: + return + col_width = max(len(line) for line in lines) + n_cols = int((term_width + pad - indent)/(col_width + pad)) + n_cols = min(n_lines, max(1, n_cols)) + col_len = int(n_lines/n_cols) + (0 if n_lines % n_cols == 0 else 1) + if (n_cols - 1) * col_len >= n_lines: + n_cols -= 1 + cols = [lines[i*col_len : i*col_len + col_len] for i in range(n_cols)] + rows = list(zip(*cols)) + rows_missed = zip(*[col[len(rows):] for col in cols[:-1]]) + rows.extend(rows_missed) + for row in rows: + print(" "*indent + (" "*pad).join(line.ljust(col_width) for line in row)) + + try: + user = User.find_user_by_username(user) + except HTTPError as err: + raise ResourceNotFoundError("User {} does not exists.".format(user)) from err + + repositories = user.repositories() + if not _long: + repositories = list(repositories) + col_print(["/".join([user.username, repo.name]) for repo in repositories]) + else: + print('Status\tCommits\tReqs\tIssues\tForks\tCoders\tWatch\tLikes\tLang\tModif\t\tName', file=sys.stderr) + for repo in repositories: + # if repo.updated_at.year < datetime.now().year: + # date_fmt = "%b %d %Y" + # else: + # date_fmt = "%b %d %H:%M" + + status = ''.join([ + 'F' if getattr(repo, 'parent', None) else ' ', # is a fork? + 'P' if repo.is_private else ' ', # is private? + ]) + print('\t'.join([ + # status + status, + # stats + str(len(list(repo.commits()))), # number of commits + str(len(list(repo.pullrequests()))), # number of pulls + str('N.A.'), # number of issues + str(len(list(repo.forks()))), # number of forks + str('N.A.'), # number of contributors + str(len(list(repo.watchers()))), # number of subscribers + str('N.A.'), # number of ♥ + # info + repo.language or '?', # language + repo.updated_on, # date + '/'.join([user.username, repo.name]), # name + ])) + def get_repository(self, user, repo): try: return Repository.find_repository_by_name_and_owner(repo, owner=user, client=self.bb)