hc99 commited on
Commit
2c17839
·
verified ·
1 Parent(s): 6e3e1be

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. testbed/atlassian-api__atlassian-python-api/.dockerignore +19 -0
  2. testbed/atlassian-api__atlassian-python-api/.gitbugtraq +5 -0
  3. testbed/atlassian-api__atlassian-python-api/.github/bump_version +65 -0
  4. testbed/atlassian-api__atlassian-python-api/.github/workflows/test.yml +37 -0
  5. testbed/atlassian-api__atlassian-python-api/.gitignore +121 -0
  6. testbed/atlassian-api__atlassian-python-api/.pyup.yml +5 -0
  7. testbed/atlassian-api__atlassian-python-api/.readthedocs.yml +10 -0
  8. testbed/atlassian-api__atlassian-python-api/.whitesource +8 -0
  9. testbed/atlassian-api__atlassian-python-api/CONTRIBUTING.rst +152 -0
  10. testbed/atlassian-api__atlassian-python-api/Dockerfile.qa +31 -0
  11. testbed/atlassian-api__atlassian-python-api/LICENSE +201 -0
  12. testbed/atlassian-api__atlassian-python-api/MANIFEST.in +5 -0
  13. testbed/atlassian-api__atlassian-python-api/Makefile +50 -0
  14. testbed/atlassian-api__atlassian-python-api/README.rst +165 -0
  15. testbed/atlassian-api__atlassian-python-api/atlassian-python-api.code-workspace +20 -0
  16. testbed/atlassian-api__atlassian-python-api/pyproject.toml +620 -0
  17. testbed/atlassian-api__atlassian-python-api/requirements-dev.txt +11 -0
  18. testbed/atlassian-api__atlassian-python-api/requirements.txt +6 -0
  19. testbed/atlassian-api__atlassian-python-api/setup.cfg +16 -0
  20. testbed/atlassian-api__atlassian-python-api/setup.py +59 -0
  21. testbed/atlassian-api__atlassian-python-api/tests/__init__.py +0 -0
  22. testbed/atlassian-api__atlassian-python-api/tests/mockup.py +75 -0
  23. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/GET +254 -0
  24. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace1/GET +18 -0
  25. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/DELETE +3 -0
  26. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/none/GET +12 -0
  27. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/DELETE +3 -0
  28. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/none/GET +19 -0
  29. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/GET +27 -0
  30. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/GET +9 -0
  31. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/PUT +36 -0
  32. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/DELETE +3 -0
  33. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/GET +22 -0
  34. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/none/GET +12 -0
  35. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/DELETE +3 -0
  36. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/GET +66 -0
  37. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/GET +101 -0
  38. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/GET +28 -0
  39. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/PUT +114 -0
  40. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/contributing/GET +5 -0
  41. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/GET +1 -0
  42. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/PUT +1 -0
  43. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/forks/GET +61 -0
  44. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/license/GET +5 -0
  45. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/DELETE +3 -0
  46. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/GET +22 -0
  47. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/none/GET +12 -0
  48. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/DELETE +3 -0
  49. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/GET +66 -0
  50. testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/none/GET +19 -0
testbed/atlassian-api__atlassian-python-api/.dockerignore ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ignore all by default
2
+ *
3
+
4
+ # explicitly allow certain code files, build files config files, and documentation
5
+ !*.py
6
+ !atlassian/**.py
7
+ !docs/**.py
8
+ !**.md
9
+ !**.rst
10
+ !*.txt
11
+ !*.cfg
12
+ !**/requirements.txt
13
+
14
+ # explicitly allow tests
15
+ !doc/examples
16
+ !tests
17
+
18
+ # always ignore these files
19
+ **/*.pyc
testbed/atlassian-api__atlassian-python-api/.gitbugtraq ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # .gitbugtraq for Git GUIs (e.g. SmartGit) to show links to the Github issue tracker.
2
+ [bugtraq]
3
+ url = https://github.com/atlassian-api/atlassian-python-api/issues/%BUGID%
4
+ loglinkregex = "#\\d+"
5
+ logregex = \\d+
testbed/atlassian-api__atlassian-python-api/.github/bump_version ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ if [[ ( -z ${1+x} ) || ( -z ${2+x} ) ]]; then
4
+ cat << EOF
5
+ usage: $(basename ${0}) repo increment
6
+
7
+ Quick and dirty version bump script
8
+ If a variable "BUILD_VERSION" is set, returns that variable as is
9
+ If "BUILD_VERSION" is not set, returns the bumped version based on last existing tag
10
+ and appends .devN where N is the build number.
11
+ (tags get sorted using 'sort -V', nothing fancy here)
12
+ If no tags are present, the initial version will be 0.1.0
13
+
14
+ Expects arguments:
15
+ - repo: the relative/absolute path to the repository
16
+ - increment: (major|minor|patch) part of the version to INCREASE, default is patch
17
+ EOF
18
+ exit 1
19
+ fi
20
+
21
+ REPO_PATH=${1}
22
+ INCREASE=${2:patch}
23
+
24
+
25
+ function autoversion(){
26
+
27
+ if [ -n "${GITHUB_RUN_NUMBER+x}" ]; then
28
+ BUILD_NUMBER="${GITHUB_RUN_NUMBER}"
29
+ else
30
+ BUILD_NUMBER="0" # In the developer machine, this will build x.y.z.dev0
31
+ fi
32
+
33
+ cd ${REPO_PATH} || exit 1
34
+
35
+ git fetch --tags 2>/dev/null
36
+ last_tag=$(git tag | sort -Vr | head -1)
37
+
38
+ # Catch existing no tags case
39
+ if [ -z "${last_tag}" ]; then
40
+ echo "0.1.0.dev${BUILD_NUMBER}"
41
+ else
42
+ a=( ${last_tag//./ } ) # replace points, split into array
43
+ case ${INCREASE} in
44
+ patch)
45
+ ((a[2]++))
46
+ ;;
47
+ minor)
48
+ ((a[1]++))
49
+ a[2]=0
50
+ ;;
51
+ major)
52
+ ((a[0]++))
53
+ a[1]=0
54
+ a[2]=0
55
+ ;;
56
+ esac
57
+ echo "${a[0]}.${a[1]}.${a[2]}.dev${BUILD_NUMBER}"
58
+ fi
59
+ }
60
+
61
+ if [ -n "${BUILD_VERSION+x}" ]; then
62
+ echo "${BUILD_VERSION}"
63
+ else
64
+ autoversion
65
+ fi
testbed/atlassian-api__atlassian-python-api/.github/workflows/test.yml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: Test
5
+
6
+ on:
7
+ push:
8
+ branches: [ master ]
9
+ pull_request:
10
+ branches: [ master ]
11
+
12
+ jobs:
13
+
14
+ run-docker:
15
+
16
+ runs-on: ubuntu-18.04
17
+
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ python-version: ['3.6', '3.7', '3.8', '3.9']
22
+
23
+ steps:
24
+ - uses: actions/checkout@v2
25
+ - name: Build Docker
26
+ run: |
27
+ make docker-qa-build PYTHON_VERSION=${{matrix.python-version}}
28
+ - name: Run Docker
29
+ run: |
30
+ .github/bump_version ./ minor > atlassian/VERSION
31
+ make docker-qa PYTHON_VERSION=${{matrix.python-version}}
32
+ - name: Creating coverage report
33
+ if: ${{ ( matrix.python-version == '3.8' ) }}
34
+ uses: codecov/codecov-action@v1
35
+ with:
36
+ files: ./coverage.xml
37
+ fail_ci_if_error: true
testbed/atlassian-api__atlassian-python-api/.gitignore ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .idea
2
+ .sonarlint
3
+ .pytest_cache
4
+ # Created by .ignore support plugin (hsz.mobi)
5
+ ### Python template
6
+ # Byte-compiled / optimized / DLL files
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+
11
+ # Temporary created when running tox
12
+ atlassian-python-api-*
13
+
14
+ # C extensions
15
+ *.so
16
+
17
+ # Distribution / packaging
18
+ .Python
19
+ build/
20
+ develop-eggs/
21
+ dist/
22
+ downloads/
23
+ eggs/
24
+ .eggs/
25
+ lib/
26
+ lib64/
27
+ parts/
28
+ sdist/
29
+ var/
30
+ wheels/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+ MANIFEST
35
+ docs/_builds
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+
42
+ # Installer logs
43
+ pip-log.txt
44
+ pip-delete-this-directory.txt
45
+
46
+ # Unit test / coverage reports
47
+ htmlcov/
48
+ .tox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ .hypothesis/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ .static_storage/
64
+ .media/
65
+ local_settings.py
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build
76
+ Thumbs.db
77
+ .DS_Store
78
+
79
+ # PyBuilder
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # pyenv
86
+ .python-version
87
+
88
+ # celery beat schedule file
89
+ celerybeat-schedule
90
+
91
+ # SageMath parsed files
92
+ *.sage.py
93
+
94
+ # Environments
95
+ .env
96
+ .venv
97
+ env/
98
+ venv/
99
+ ENV/
100
+ env.bak/
101
+ venv.bak/
102
+ venv_/
103
+
104
+ # Spyder project settings
105
+ .spyderproject
106
+ .spyproject
107
+
108
+ # Rope project settings
109
+ .ropeproject
110
+
111
+ # mkdocs documentation
112
+ /site
113
+
114
+ # mypy
115
+ .mypy_cache/
116
+
117
+ #
118
+ *.secret
119
+
120
+ #visual studio code
121
+ .vscode
testbed/atlassian-api__atlassian-python-api/.pyup.yml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # autogenerated pyup.io config file
2
+ # see https://pyup.io/docs/configuration/ for all available options
3
+
4
+ schedule: every week
5
+ update: insecure
testbed/atlassian-api__atlassian-python-api/.readthedocs.yml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # .readthedocs.yml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Build documentation in the docs/ directory with Sphinx
9
+ sphinx:
10
+ configuration: docs/conf.py
testbed/atlassian-api__atlassian-python-api/.whitesource ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "checkRunSettings": {
3
+ "vulnerableCheckRunConclusionLevel": "failure"
4
+ },
5
+ "issueSettings": {
6
+ "minSeverityLevel": "LOW"
7
+ }
8
+ }
testbed/atlassian-api__atlassian-python-api/CONTRIBUTING.rst ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ How to contribute
2
+ =================
3
+
4
+ You’re very welcome to make bug fixes or enhancements to this library.
5
+ This document lays out the guidelines for how to get those changes into
6
+ the main package repository.
7
+
8
+ Getting Started
9
+ ---------------
10
+
11
+ * Fork_ repository
12
+ * Keep it sync_'ed while you are developing
13
+ * Install pyenv_
14
+ * Install related atlassian product for testing through SDK_ or use the cloud instance
15
+ * ``pip install -r requirements-dev.txt``
16
+ * Start up related product:
17
+ - Standalone product atlas-run-standalone_
18
+ - For cloud product, just do registration
19
+ * Run the quality checks with `make qa` or if you have docker installed with `make docker-qa`
20
+ * Send pull request
21
+
22
+ .. _Fork: https://help.github.com/articles/fork-a-repo/
23
+ .. _sync: https://help.github.com/articles/syncing-a-fork/
24
+ .. _pyenv: https://amaral.northwestern.edu/resources/guides/pyenv-tutorial
25
+ .. _SDK: https://developer.atlassian.com/server/framework/atlassian-sdk/downloads/
26
+ .. _atlas-run-standalone: https://developer.atlassian.com/server/framework/atlassian-sdk/atlas-run-standalone/
27
+
28
+ Mandatory conditions
29
+ --------------------
30
+
31
+ 1. If you adding new method - add description to docs
32
+ 2. If you make changes in current methods - add changes to docs
33
+ 3. If you sent the PR, please validate via black_
34
+
35
+ Please follow the code style in the docs.
36
+
37
+ .. _black: https://black.readthedocs.io/en/stable/editor_integration.html
38
+
39
+ Connect on Chat for any queries
40
+ ---------------------------------
41
+
42
+ Please message on chat-group link present in `README.rst`_ badge for any queries.
43
+
44
+ .. _README.rst: README.rst
45
+
46
+
47
+ Before you raise a PR
48
+ ---------------------
49
+
50
+ Create the **Commit Header** with the relevant Service Name pre-fixed, examples below,
51
+
52
+ * Jira: review user module :heavy_check_mark:
53
+ * [JIRA] Issues Move to Sprint :heavy_check_mark:
54
+ * Confluence: update_page_property method :heavy_check_mark:
55
+
56
+ An example of a commit message header,
57
+
58
+ * Addition of parameters for start & limit in the function of `get_all_project_issues` :x:
59
+
60
+ could be better written as,
61
+
62
+ * [JIRA] Project Issues parameter addition for start and limit :heavy_check_mark:
63
+
64
+ with the commit body have a detail about where/what changes introduced.
65
+
66
+ This will help the reviewer or log-viewers to better identify what a particular commit is for.
67
+
68
+
69
+ Using your changes before they’re live
70
+ --------------------------------------
71
+
72
+ You may want to use the changes you’ve made to this library before the
73
+ merging/review process has been completed. To do this you can install it
74
+ into the global python environment by running this command from the top
75
+ level directory.
76
+
77
+ ::
78
+
79
+ pip install . --upgrade
80
+
81
+ The following command builds a package and uploads it to PIP repository.
82
+
83
+ ::
84
+
85
+ python setup.py sdist upload
86
+
87
+ An alternative way you can use next command
88
+
89
+ ::
90
+
91
+ python3 -m pip install git+https://github.com/atlassian-api/atlassian-python-api.git
92
+
93
+
94
+ References
95
+ ----------
96
+
97
+ All methods based on docs from: https://developer.atlassian.com/docs/
98
+
99
+ * Jira
100
+ - `Jira Server`_
101
+ - `Jira Cloud`_
102
+ * Jira Service Desk
103
+ - `Jira Service Desk Server`_
104
+ - `Jira Service Desk Cloud`_
105
+ * Confluence
106
+ - `Confluence Server`_
107
+ - `Confluence Cloud`_
108
+ * Advanced Roadmaps (formerly Portfolio for Jira)
109
+ - `Portfolio for Jira`_
110
+ - `Portfolio for Jira Teams`_
111
+ * Bitbucket:
112
+ - https://developer.atlassian.com/server/bitbucket/reference/rest-api/
113
+ - https://developer.atlassian.com/server/bitbucket/how-tos/command-line-rest/
114
+ - https://developer.atlassian.com/bitbucket/api/2/reference/resource/
115
+ * Bamboo:
116
+ - https://docs.atlassian.com/atlassian-bamboo/REST/latest/
117
+ * Tempo:
118
+ - https://www.tempo.io/server-api-documentation
119
+ - http://tempo.io/doc/core/api/rest/latest/
120
+ * Marketplace:
121
+ - https://developer.atlassian.com/platform/marketplace/rest
122
+ * Crowd:
123
+ - https://developer.atlassian.com/server/crowd/crowd-rest-apis/
124
+ * Xray:
125
+ - https://docs.getxray.app/display/XRAY/REST+API
126
+ * Others:
127
+ - https://developer.atlassian.com/server/jira/platform/oauth/
128
+ - https://confluence.atlassian.com/cloud/api-tokens-938839638.html
129
+
130
+ .. _`Jira Server`: https://docs.atlassian.com/software/jira/docs/api/REST/latest
131
+ .. _`Jira Cloud`: https://developer.atlassian.com/cloud/jira/platform/rest/v3/
132
+ .. _`Confluence Server`: https://developer.atlassian.com/server/confluence/confluence-server-rest-api/
133
+ .. _`Confluence Cloud`: https://developer.atlassian.com/cloud/confluence/rest/
134
+ .. _`Jira Service Desk Cloud`: https://developer.atlassian.com/cloud/jira/service-desk/rest/
135
+ .. _`Jira Service Desk Server`: https://docs.atlassian.com/jira-servicedesk/REST/server
136
+ .. _`Portfolio for Jira Teams`: https://docs.atlassian.com/portfolio-for-jira-server/REST/2.13.0/teams/
137
+ .. _`Portfolio for Jira`: https://docs.atlassian.com/portfolio-for-jira-server/REST/2.13.0/jpo/
138
+
139
+
140
+ Credits
141
+ -------
142
+ In addition to all the contributors we would like to thank to these companies:
143
+
144
+ * Atlassian_ for developing such a powerful ecosystem.
145
+ * JetBrains_ for providing us with free licenses of PyCharm_
146
+ * GitHub_ for hosting our repository and continuous integration
147
+ * Insomnia_ for providing the human rest client easy to test the methods
148
+ .. _Atlassian: https://www.atlassian.com/
149
+ .. _JetBrains: http://www.jetbrains.com
150
+ .. _PyCharm: http://www.jetbrains.com/pycharm/
151
+ .. _GitHub: https://github.com/
152
+ .. _Insomnia: https://insomnia.rest/
testbed/atlassian-api__atlassian-python-api/Dockerfile.qa ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:20.04
2
+
3
+ ARG PYTHON_VERSION
4
+
5
+ # Install add-apt-repository
6
+ RUN apt-get update
7
+ RUN apt-get install -y software-properties-common
8
+
9
+ # Install python development
10
+ RUN add-apt-repository ppa:deadsnakes/ppa
11
+ RUN apt-get update
12
+ RUN apt-get install -y python$PYTHON_VERSION-dev python3-pip
13
+ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python$PYTHON_VERSION 1
14
+
15
+ # Install kerberos development
16
+ RUN apt-get install -y libkrb5-dev
17
+
18
+ # Clean
19
+ RUN apt-get clean
20
+
21
+ # Install modules
22
+ WORKDIR /atlassian-python-api
23
+ COPY requirements.txt .
24
+ COPY requirements-dev.txt .
25
+ RUN python3 -m pip install --no-cache-dir --upgrade pip
26
+ RUN python3 -m pip install --no-cache-dir -r requirements-dev.txt
27
+
28
+ ENV PYTHON_VERSION=$PYTHON_VERSION
29
+
30
+ CMD python3 -m pip install -e . && \
31
+ make qa PYTHON_VERSION=$PYTHON_VERSION
testbed/atlassian-api__atlassian-python-api/LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2014 Mateusz Harasymczuk
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
testbed/atlassian-api__atlassian-python-api/MANIFEST.in ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ include atlassian/VERSION
2
+ include LICENSE
3
+ include README.rst
4
+ include tox.ini
5
+ include requirements.txt
testbed/atlassian-api__atlassian-python-api/Makefile ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This Makefile helps perform some developer tasks, like linting or testing.
2
+ # Run `make` or `make help` to see a list of tasks.
3
+ # Based on GCOVR project (https://github.com/gcovr/gcovr).
4
+
5
+ PYTHON_VERSION ?= 3.7
6
+
7
+ QA_CONTAINER ?= atlassian-python-api-qa-$(PYTHON_VERSION)
8
+ TEST_OPTS ?=
9
+
10
+ LINTING_TARGETS := atlassian/ examples/ tests/
11
+
12
+ .PHONY: help setup-dev qa lint test doc docker-qa docker-qa-build
13
+
14
+ help:
15
+ @echo "select one of the following targets:"
16
+ @echo " help print this message"
17
+ @echo " setup-dev prepare a development environment"
18
+ @echo " qa run all QA tasks"
19
+ @echo " test run the tests"
20
+ @echo " docker-qa run qa in the docker container"
21
+ @echo " docker-qa-build"
22
+ @echo " build the qa docker container"
23
+ @echo ""
24
+ @echo "environment variables:"
25
+ @echo " TEST_OPTS additional flags for pytest [current: $(TEST_OPTS)]"
26
+ @echo " QA_CONTAINER"
27
+ @echo " tag for the qa docker container [current: $(QA_CONTAINER)]"
28
+
29
+ setup-dev:
30
+ python3 -m pip install --upgrade pip pytest
31
+ python3 -m pip install -r requirements-dev.txt
32
+
33
+ qa: tox
34
+
35
+ tox: export PYTHONDONTWRITEBYTECODE := 1
36
+
37
+ tox:
38
+ tox
39
+
40
+ docker-qa: export TEST_OPTS := $(TEST_OPTS)
41
+ docker-qa: export PYTHONDONTWRITEBYTECODE := 1
42
+
43
+ docker-qa: | docker-qa-build
44
+ docker run --rm -e TEST_OPTS -e PYTHONDONTWRITEBYTECODE -v `pwd`:/atlassian-python-api $(QA_CONTAINER)
45
+
46
+ docker-qa-build: Dockerfile.qa requirements.txt requirements-dev.txt
47
+ docker build \
48
+ --tag $(QA_CONTAINER) \
49
+ --build-arg PYTHON_VERSION=$(PYTHON_VERSION) \
50
+ --file $< .
testbed/atlassian-api__atlassian-python-api/README.rst ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ============================
2
+ Atlassian Python API wrapper
3
+ ============================
4
+ |Build Status| |PyPI version| |PyPI - Downloads| |License| |Codacy Badge| |Docs| |Discord|
5
+
6
+ What is it?
7
+ ___________
8
+ This package is used to provide a **simple** python interface for interacting with Atlassian products
9
+ (Server, Data Center and Cloud) and apps from ecosystem (Portfolio, XRay).
10
+ It is based on the official public Rest API documentation and private methods (+ xml+rpc, raw http request).
11
+
12
+ Documentation
13
+ _____________
14
+
15
+ `Documentation`_
16
+
17
+ .. _Documentation: https://atlassian-python-api.readthedocs.io
18
+
19
+ How to Install?
20
+ _______________
21
+
22
+ From PyPI
23
+
24
+ .. code-block:: console
25
+
26
+ $ pip install atlassian-python-api
27
+
28
+ From Source
29
+
30
+ - Git clone repository
31
+ - Use :code:`pip install -r requirements.txt` to install the required packages
32
+ - or :code:`pipenv install && pipenv install --dev`
33
+
34
+ Examples
35
+ ________
36
+ More **examples** in :code:`examples/` directory.
37
+
38
+ Here's a short example of how to create a Confluence page:
39
+
40
+ .. code-block:: python
41
+
42
+ from atlassian import Confluence
43
+
44
+ confluence = Confluence(
45
+ url='http://localhost:8090',
46
+ username='admin',
47
+ password='admin')
48
+
49
+ status = confluence.create_page(
50
+ space='DEMO',
51
+ title='This is the title',
52
+ body='This is the body. You can use <strong>HTML tags</strong>!')
53
+
54
+ print(status)
55
+
56
+ And here's another example of how to get issues from Jira using JQL Query:
57
+
58
+ .. code-block:: python
59
+
60
+ from atlassian import Jira
61
+
62
+ jira = Jira(
63
+ url='http://localhost:8080',
64
+ username='admin',
65
+ password='admin')
66
+ JQL = 'project = DEMO AND status IN ("To Do", "In Progress") ORDER BY issuekey'
67
+ data = jira.jql(JQL)
68
+ print(data)
69
+
70
+ Also, you can use the Bitbucket module e.g. for getting project list
71
+
72
+ .. code-block:: python
73
+
74
+ from atlassian import Bitbucket
75
+
76
+ bitbucket = Bitbucket(
77
+ url='http://localhost:7990',
78
+ username='admin',
79
+ password='admin')
80
+
81
+ data = bitbucket.project_list()
82
+ print(data)
83
+
84
+ Now you can use the Jira Service Desk module. See docs.
85
+ Example to get your requests:
86
+
87
+ .. code-block:: python
88
+
89
+ from atlassian import ServiceDesk
90
+
91
+ sd = ServiceDesk(
92
+ url='http://localhost:7990',
93
+ username='admin',
94
+ password='admin')
95
+
96
+ data = sd.get_my_customer_requests()
97
+ print(data)
98
+
99
+ Using Xray (Test Management tool for Jira):
100
+
101
+ .. code-block:: python
102
+
103
+ from atlassian import Xray
104
+
105
+ xr = Xray(
106
+ url='http://localhost:7990',
107
+ username='admin',
108
+ password='admin')
109
+
110
+ data = xr.get_tests('TEST-001')
111
+ print(data)
112
+
113
+ If you want to see the response in pretty print format JSON. Feel free for use construction like:
114
+
115
+ .. code-block:: python
116
+
117
+ from pprint import pprint
118
+ # you code here
119
+ # and then print using pprint(result) instead of print(result)
120
+ pprint(response)
121
+
122
+ How to contribute?
123
+ __________________
124
+ First of all, I am happy for any PR requests.
125
+ Let's fork and provide your changes :)
126
+ See the `Contribution Guidelines for this project`_ for details on how to make changes to this library.
127
+
128
+ .. _Contribution Guidelines for this project: CONTRIBUTING.rst
129
+ .. |Build Status| image:: https://github.com/atlassian-api/atlassian-python-api/workflows/Test/badge.svg?branch=master
130
+ :target: https://github.com/atlassian-api/atlassian-python-api/actions?query=workflow%3ATest+branch%3Amaster
131
+ :alt: Build status
132
+ .. |PyPI version| image:: https://badge.fury.io/py/atlassian-python-api.svg
133
+ :target: https://badge.fury.io/py/atlassian-python-api
134
+ :alt: PyPI version
135
+ .. |License| image:: https://img.shields.io/pypi/l/atlassian-python-api.svg
136
+ :target: https://pypi.python.org/pypi/atlassian-python-api
137
+ :alt: License
138
+ .. |Codacy Badge| image:: https://api.codacy.com/project/badge/Grade/c822908f507544fe98ae37b25518ae3d
139
+ :target: https://www.codacy.com/project/gonchik/atlassian-python-api/dashboard
140
+ :alt: Codacy Badge
141
+ .. |PyPI - Downloads| image:: https://pepy.tech/badge/atlassian-python-api/month
142
+ :alt: PyPI - Downloads
143
+ .. |Docs| image:: https://readthedocs.org/projects/atlassian-python-api/badge/?version=latest
144
+ :target: https://atlassian-python-api.readthedocs.io/?badge=latest
145
+ :alt: Documentation Status
146
+ .. |Discord| image:: https://img.shields.io/discord/756142204761669743.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2
147
+ :alt: Discord Chat
148
+ :target: https://discord.gg/FCJsvqh
149
+
150
+
151
+ Credits
152
+ _______
153
+ In addition to all the contributors we would like to thank these vendors:
154
+
155
+ * Atlassian_ for developing such a powerful ecosystem.
156
+ * JetBrains_ for providing us with free licenses of PyCharm_
157
+ * Microsoft_ for providing us with free licenses of VSCode_
158
+ * GitHub_ for hosting our repository and continuous integration
159
+
160
+ .. _Atlassian: https://www.atlassian.com/
161
+ .. _JetBrains: http://www.jetbrains.com
162
+ .. _PyCharm: http://www.jetbrains.com/pycharm/
163
+ .. _GitHub: https://github.com/
164
+ .. _Microsoft: https://github.com/Microsoft/vscode/
165
+ .. _VSCode: https://code.visualstudio.com/
testbed/atlassian-api__atlassian-python-api/atlassian-python-api.code-workspace ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "folders": [
3
+ {
4
+ "path": "."
5
+ }
6
+ ],
7
+ "settings": {
8
+ "files.exclude": {
9
+ ".mypy_cache": true,
10
+ "**/__pycache__": true,
11
+ "**/*.pyc": true,
12
+ },
13
+ "files.associations": {
14
+ "DELETE": "python",
15
+ "GET": "python",
16
+ "POST": "python",
17
+ "PUT": "python",
18
+ }
19
+ }
20
+ }
testbed/atlassian-api__atlassian-python-api/pyproject.toml ADDED
@@ -0,0 +1,620 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # pyproject.toml is a new configuration file defined in PEP 518.
2
+ # It is design to store build system requirements, but it can also store any
3
+ # tool configuration for your Python project, possibly replacing the need for
4
+ # setup.cfg or other tool-specific files.
5
+ # https://github.com/carlosperate/awesome-pyproject
6
+
7
+ [tool.black]
8
+ target-version = ['py27','py36', 'py37', 'py38']
9
+ line-length = 120
10
+ include_trailing_comma = false
11
+ include = '(atlassian|examples|tests)\/.*(\.py|GET|POST)'
12
+
13
+ [tool.pylint]
14
+ max-line-length = 120
15
+
16
+ [tool.pylint.MASTER]
17
+
18
+ # A comma-separated list of package or module names from where C extensions may
19
+ # be loaded. Extensions are loading into the active Python interpreter and may
20
+ # run arbitrary code.
21
+ extension-pkg-whitelist=''
22
+
23
+ # Specify a score threshold to be exceeded before program exits with error.
24
+ fail-under=10.0
25
+
26
+ # Add files or directories to the blacklist. They should be base names, not
27
+ # paths.
28
+ ignore='.git'
29
+
30
+ # Add files or directories matching the regex patterns to the blacklist. The
31
+ # regex matches against base names, not paths.
32
+ ignore-patterns=''
33
+
34
+ # Python code to execute, usually for sys.path manipulation such as
35
+ # pygtk.require().
36
+ #init-hook=
37
+
38
+ # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
39
+ # number of processors available to use.
40
+ jobs=0
41
+
42
+ # Control the amount of potential inferred values when inferring a single
43
+ # object. This can help the performance when dealing with large functions or
44
+ # complex, nested conditions.
45
+ limit-inference-results=100
46
+
47
+ # List of plugins (as comma separated values of python module names) to load,
48
+ # usually to register additional checkers.
49
+ load-plugins=''
50
+
51
+ # Pickle collected data for later comparisons.
52
+ persistent='yes'
53
+
54
+ # When enabled, pylint would attempt to guess common misconfiguration and emit
55
+ # user-friendly hints instead of false-positive error messages.
56
+ suggestion-mode='yes'
57
+
58
+ # Allow loading of arbitrary C extensions. Extensions are imported into the
59
+ # active Python interpreter and may run arbitrary code.
60
+ unsafe-load-any-extension='no'
61
+
62
+
63
+ ['tool.pylint.MESSAGES CONTROL']
64
+
65
+ # Only show warnings with the listed confidence levels. Leave empty to show
66
+ # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
67
+ confidence=''
68
+
69
+ # Disable the message, report, category or checker with the given id(s). You
70
+ # can either give multiple identifiers separated by comma (,) or put this
71
+ # option multiple times (only on the command line, not in the configuration
72
+ # file where it should appear only once). You can also use "--disable=all" to
73
+ # disable everything first and then reenable specific checks. For example, if
74
+ # you want to run only the similarities checker, you can use "--disable=all
75
+ # --enable=similarities". If you want to run only the classes checker, but have
76
+ # no Warning level messages displayed, use "--disable=all --enable=classes
77
+ # --disable=W".
78
+ disable='''print-statement,
79
+ parameter-unpacking,
80
+ unpacking-in-except,
81
+ old-raise-syntax,
82
+ backtick,
83
+ long-suffix,
84
+ old-ne-operator,
85
+ old-octal-literal,
86
+ import-star-module-level,
87
+ non-ascii-bytes-literal,
88
+ raw-checker-failed,
89
+ bad-inline-option,
90
+ locally-disabled,
91
+ file-ignored,
92
+ suppressed-message,
93
+ useless-suppression,
94
+ deprecated-pragma,
95
+ use-symbolic-message-instead,
96
+ apply-builtin,
97
+ basestring-builtin,
98
+ buffer-builtin,
99
+ cmp-builtin,
100
+ coerce-builtin,
101
+ execfile-builtin,
102
+ file-builtin,
103
+ long-builtin,
104
+ raw_input-builtin,
105
+ reduce-builtin,
106
+ standarderror-builtin,
107
+ unicode-builtin,
108
+ xrange-builtin,
109
+ coerce-method,
110
+ delslice-method,
111
+ getslice-method,
112
+ setslice-method,
113
+ no-absolute-import,
114
+ old-division,
115
+ dict-iter-method,
116
+ dict-view-method,
117
+ next-method-called,
118
+ metaclass-assignment,
119
+ indexing-exception,
120
+ raising-string,
121
+ reload-builtin,
122
+ oct-method,
123
+ hex-method,
124
+ nonzero-method,
125
+ cmp-method,
126
+ input-builtin,
127
+ round-builtin,
128
+ intern-builtin,
129
+ unichr-builtin,
130
+ map-builtin-not-iterating,
131
+ zip-builtin-not-iterating,
132
+ range-builtin-not-iterating,
133
+ filter-builtin-not-iterating,
134
+ using-cmp-argument,
135
+ eq-without-hash,
136
+ div-method,
137
+ idiv-method,
138
+ rdiv-method,
139
+ exception-message-attribute,
140
+ invalid-str-codec,
141
+ sys-max-int,
142
+ bad-python3-import,
143
+ deprecated-string-function,
144
+ deprecated-str-translate-call,
145
+ deprecated-itertools-function,
146
+ deprecated-types-field,
147
+ next-method-defined,
148
+ dict-items-not-iterating,
149
+ dict-keys-not-iterating,
150
+ dict-values-not-iterating,
151
+ deprecated-operator-function,
152
+ deprecated-urllib-function,
153
+ xreadlines-attribute,
154
+ deprecated-sys-function,
155
+ exception-escape,
156
+ comprehension-escape,
157
+ missing-module-docstring,
158
+ missing-class-docstring,
159
+ missing-function-docstring,
160
+ W,
161
+ R0201,
162
+ '''
163
+
164
+ # Enable the message, report, category or checker with the given id(s). You can
165
+ # either give multiple identifier separated by comma (,) or put this option
166
+ # multiple time (only on the command line, not in the configuration file where
167
+ # it should appear only once). See also the "--disable" option for examples.
168
+ enable='c-extension-no-member'
169
+
170
+
171
+ [tool.pylint.REPORTS]
172
+
173
+ # Python expression which should return a score less than or equal to 10. You
174
+ # have access to the variables 'error', 'warning', 'refactor', and 'convention'
175
+ # which contain the number of messages in each category, as well as 'statement'
176
+ # which is the total number of statements analyzed. This score is used by the
177
+ # global evaluation report (RP0004).
178
+ evaluation='10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)'
179
+
180
+ # Template used to display messages. This is a python new-style format string
181
+ # used to format the message information. See doc for all details.
182
+ #msg-template=
183
+
184
+ # Set the output format. Available formats are text, parseable, colorized, json
185
+ # and msvs (visual studio). You can also give a reporter class, e.g.
186
+ # mypackage.mymodule.MyReporterClass.
187
+ output-format='text'
188
+
189
+ # Tells whether to display a full report or only the messages.
190
+ reports='no'
191
+
192
+ # Activate the evaluation score.
193
+ score='yes'
194
+
195
+
196
+ [tool.pylint.REFACTORING]
197
+
198
+ # Maximum number of nested blocks for function / method body
199
+ max-nested-blocks=5
200
+
201
+ # Complete name of functions that never returns. When checking for
202
+ # inconsistent-return-statements if a never returning function is called then
203
+ # it will be considered as an explicit return statement and no message will be
204
+ # printed.
205
+ never-returning-functions='sys.exit'
206
+
207
+
208
+ [tool.pylint.LOGGING]
209
+
210
+ # The type of string formatting that logging methods do. `old` means using %
211
+ # formatting, `new` is for `{}` formatting.
212
+ logging-format-style='old'
213
+
214
+ # Logging modules to check that the string format arguments are in logging
215
+ # function parameter format.
216
+ logging-modules='logging'
217
+
218
+
219
+ [tool.pylint.SPELLING]
220
+
221
+ # Limits count of emitted suggestions for spelling mistakes.
222
+ max-spelling-suggestions=4
223
+
224
+ # Spelling dictionary name. Available dictionaries: none. To make it work,
225
+ # install the python-enchant package.
226
+ spelling-dict=''
227
+
228
+ # List of comma separated words that should not be checked.
229
+ spelling-ignore-words=''
230
+
231
+ # A path to a file that contains the private dictionary; one word per line.
232
+ spelling-private-dict-file=''
233
+
234
+ # Tells whether to store unknown words to the private dictionary (see the
235
+ # --spelling-private-dict-file option) instead of raising a message.
236
+ spelling-store-unknown-words='no'
237
+
238
+
239
+ [tool.pylint.MISCELLANEOUS]
240
+
241
+ # List of note tags to take in consideration, separated by a comma.
242
+ notes='''FIXME,
243
+ XXX,
244
+ TODO
245
+ '''
246
+
247
+ # Regular expression of note tags to take in consideration.
248
+ #notes-rgx=
249
+
250
+
251
+ [tool.pylint.TYPECHECK]
252
+
253
+ # List of decorators that produce context managers, such as
254
+ # contextlib.contextmanager. Add to this list to register other decorators that
255
+ # produce valid context managers.
256
+ contextmanager-decorators='contextlib.contextmanager'
257
+
258
+ # List of members which are set dynamically and missed by pylint inference
259
+ # system, and so shouldn't trigger E1101 when accessed. Python regular
260
+ # expressions are accepted.
261
+ generated-members=''
262
+
263
+ # Tells whether missing members accessed in mixin class should be ignored. A
264
+ # mixin class is detected if its name ends with "mixin" (case insensitive).
265
+ ignore-mixin-members='yes'
266
+
267
+ # Tells whether to warn about missing members when the owner of the attribute
268
+ # is inferred to be None.
269
+ ignore-none='yes'
270
+
271
+ # This flag controls whether pylint should warn about no-member and similar
272
+ # checks whenever an opaque object is returned when inferring. The inference
273
+ # can return multiple potential results while evaluating a Python object, but
274
+ # some branches might not be evaluated, which results in partial inference. In
275
+ # that case, it might be useful to still emit no-member and other checks for
276
+ # the rest of the inferred objects.
277
+ ignore-on-opaque-inference='yes'
278
+
279
+ # List of class names for which member attributes should not be checked (useful
280
+ # for classes with dynamically set attributes). This supports the use of
281
+ # qualified names.
282
+ ignored-classes='optparse.Values,thread._local,_thread._local'
283
+
284
+ # List of module names for which member attributes should not be checked
285
+ # (useful for modules/projects where namespaces are manipulated during runtime
286
+ # and thus existing member attributes cannot be deduced by static analysis). It
287
+ # supports qualified module names, as well as Unix pattern matching.
288
+ ignored-modules=''
289
+
290
+ # Show a hint with possible names when a member name was not found. The aspect
291
+ # of finding the hint is based on edit distance.
292
+ missing-member-hint='yes'
293
+
294
+ # The minimum edit distance a name should have in order to be considered a
295
+ # similar match for a missing member name.
296
+ missing-member-hint-distance=1
297
+
298
+ # The total number of similar names that should be taken in consideration when
299
+ # showing a hint for a missing member.
300
+ missing-member-max-choices=1
301
+
302
+ # List of decorators that change the signature of a decorated function.
303
+ signature-mutators=''
304
+
305
+
306
+ [tool.pylint.VARIABLES]
307
+
308
+ # List of additional names supposed to be defined in builtins. Remember that
309
+ # you should avoid defining new builtins when possible.
310
+ additional-builtins=''
311
+
312
+ # Tells whether unused global variables should be treated as a violation.
313
+ allow-global-unused-variables='yes'
314
+
315
+ # List of strings which can identify a callback function by name. A callback
316
+ # name must start or end with one of those strings.
317
+ callbacks='''cb_,
318
+ _cb
319
+ '''
320
+
321
+ # A regular expression matching the name of dummy variables (i.e. expected to
322
+ # not be used).
323
+ dummy-variables-rgx='_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_'
324
+
325
+ # Argument names that match this expression will be ignored. Default to name
326
+ # with leading underscore.
327
+ ignored-argument-names='_.*|^ignored_|^unused_'
328
+
329
+ # Tells whether we should check for unused import in __init__ files.
330
+ init-import='no'
331
+
332
+ # List of qualified module names which can have objects that can redefine
333
+ # builtins.
334
+ redefining-builtins-modules='six.moves,past.builtins,future.builtins,builtins,io'
335
+
336
+
337
+ [tool.pylint.FORMAT]
338
+
339
+ # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
340
+ expected-line-ending-format=''
341
+
342
+ # Regexp for a line that is allowed to be longer than the limit.
343
+ ignore-long-lines='^\s*(# )?<?https?://\S+>?$'
344
+
345
+ # Number of spaces of indent required inside a hanging or continued line.
346
+ indent-after-paren=4
347
+
348
+ # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
349
+ # tab).
350
+ indent-string=' '
351
+
352
+ # Maximum number of characters on a single line.
353
+ max-line-length=120
354
+
355
+ # Maximum number of lines in a module.
356
+ max-module-lines=1000
357
+
358
+ # Allow the body of a class to be on the same line as the declaration if body
359
+ # contains single statement.
360
+ single-line-class-stmt='no'
361
+
362
+ # Allow the body of an if to be on the same line as the test if there is no
363
+ # else.
364
+ single-line-if-stmt='no'
365
+
366
+
367
+ [tool.pylint.SIMILARITIES]
368
+
369
+ # Ignore comments when computing similarities.
370
+ ignore-comments='yes'
371
+
372
+ # Ignore docstrings when computing similarities.
373
+ ignore-docstrings='yes'
374
+
375
+ # Ignore imports when computing similarities.
376
+ ignore-imports='no'
377
+
378
+ # Minimum lines number of a similarity.
379
+ min-similarity-lines=4
380
+
381
+
382
+ [tool.pylint.BASIC]
383
+
384
+ # Naming style matching correct argument names.
385
+ argument-naming-style='snake_case'
386
+
387
+ # Regular expression matching correct argument names. Overrides argument-
388
+ # naming-style.
389
+ #argument-rgx=
390
+
391
+ # Naming style matching correct attribute names.
392
+ attr-naming-style='snake_case'
393
+
394
+ # Regular expression matching correct attribute names. Overrides attr-naming-
395
+ # style.
396
+ #attr-rgx=
397
+
398
+ # Bad variable names which should always be refused, separated by a comma.
399
+ bad-names='''foo,
400
+ bar,
401
+ baz,
402
+ toto,
403
+ tutu,
404
+ tata
405
+ '''
406
+
407
+ # Bad variable names regexes, separated by a comma. If names match any regex,
408
+ # they will always be refused
409
+ bad-names-rgxs=''
410
+
411
+ # Naming style matching correct class attribute names.
412
+ class-attribute-naming-style='any'
413
+
414
+ # Regular expression matching correct class attribute names. Overrides class-
415
+ # attribute-naming-style.
416
+ #class-attribute-rgx=
417
+
418
+ # Naming style matching correct class names.
419
+ class-naming-style='PascalCase'
420
+
421
+ # Regular expression matching correct class names. Overrides class-naming-
422
+ # style.
423
+ #class-rgx=
424
+
425
+ # Naming style matching correct constant names.
426
+ const-naming-style='UPPER_CASE'
427
+
428
+ # Regular expression matching correct constant names. Overrides const-naming-
429
+ # style.
430
+ #const-rgx=
431
+
432
+ # Minimum line length for functions/classes that require docstrings, shorter
433
+ # ones are exempt.
434
+ docstring-min-length=-1
435
+
436
+ # Naming style matching correct function names.
437
+ function-naming-style='snake_case'
438
+
439
+ # Regular expression matching correct function names. Overrides function-
440
+ # naming-style.
441
+ #function-rgx=
442
+
443
+ # Good variable names which should always be accepted, separated by a comma.
444
+ good-names='''i,
445
+ j,
446
+ k,
447
+ ex,
448
+ Run,
449
+ pk,
450
+ fd,
451
+ x,
452
+ y,
453
+ _
454
+ '''
455
+
456
+ # Good variable names regexes, separated by a comma. If names match any regex,
457
+ # they will always be accepted
458
+ good-names-rgxs=''
459
+
460
+ # Include a hint for the correct naming format with invalid-name.
461
+ include-naming-hint='no'
462
+
463
+ # Naming style matching correct inline iteration names.
464
+ inlinevar-naming-style='any'
465
+
466
+ # Regular expression matching correct inline iteration names. Overrides
467
+ # inlinevar-naming-style.
468
+ #inlinevar-rgx=
469
+
470
+ # Naming style matching correct method names.
471
+ method-naming-style='snake_case'
472
+
473
+ # Regular expression matching correct method names. Overrides method-naming-
474
+ # style.
475
+ #method-rgx=
476
+
477
+ # Naming style matching correct module names.
478
+ module-naming-style='snake_case'
479
+
480
+ # Regular expression matching correct module names. Overrides module-naming-
481
+ # style.
482
+ #module-rgx=
483
+
484
+ # Colon-delimited sets of names that determine each other's naming style when
485
+ # the name regexes allow several styles.
486
+ name-group=''
487
+
488
+ # Regular expression which should only match function or class names that do
489
+ # not require a docstring.
490
+ no-docstring-rgx='^_'
491
+
492
+ # List of decorators that produce properties, such as abc.abstractproperty. Add
493
+ # to this list to register other decorators that produce valid properties.
494
+ # These decorators are taken in consideration only for invalid-name.
495
+ property-classes='abc.abstractproperty'
496
+
497
+ # Naming style matching correct variable names.
498
+ variable-naming-style='snake_case'
499
+
500
+ # Regular expression matching correct variable names. Overrides variable-
501
+ # naming-style.
502
+ #variable-rgx=
503
+
504
+
505
+ [tool.pylint.STRING]
506
+
507
+ # This flag controls whether inconsistent-quotes generates a warning when the
508
+ # character used as a quote delimiter is used inconsistently within a module.
509
+ check-quote-consistency='no'
510
+
511
+ # This flag controls whether the implicit-str-concat should generate a warning
512
+ # on implicit string concatenation in sequences defined over several lines.
513
+ check-str-concat-over-line-jumps='no'
514
+
515
+
516
+ [tool.pylint.IMPORTS]
517
+
518
+ # List of modules that can be imported at any level, not just the top level
519
+ # one.
520
+ allow-any-import-level=''
521
+
522
+ # Allow wildcard imports from modules that define __all__.
523
+ allow-wildcard-with-all='no'
524
+
525
+ # Analyse import fallback blocks. This can be used to support both Python 2 and
526
+ # 3 compatible code, which means that the block might have code that exists
527
+ # only in one or another interpreter, leading to false positives when analysed.
528
+ analyse-fallback-blocks='no'
529
+
530
+ # Deprecated modules which should not be used, separated by a comma.
531
+ deprecated-modules='optparse,tkinter.tix'
532
+
533
+ # Create a graph of external dependencies in the given file (report RP0402 must
534
+ # not be disabled).
535
+ ext-import-graph=''
536
+
537
+ # Create a graph of every (i.e. internal and external) dependencies in the
538
+ # given file (report RP0402 must not be disabled).
539
+ import-graph=''
540
+
541
+ # Create a graph of internal dependencies in the given file (report RP0402 must
542
+ # not be disabled).
543
+ int-import-graph=''
544
+
545
+ # Force import order to recognize a module as part of the standard
546
+ # compatibility libraries.
547
+ known-standard-library=''
548
+
549
+ # Force import order to recognize a module as part of a third party library.
550
+ known-third-party='enchant'
551
+
552
+ # Couples of modules and preferred modules, separated by a comma.
553
+ preferred-modules=''
554
+
555
+
556
+ [tool.pylint.CLASSES]
557
+
558
+ # List of method names used to declare (i.e. assign) instance attributes.
559
+ defining-attr-methods='''__init__,
560
+ __new__,
561
+ setUp,
562
+ __post_init__
563
+ '''
564
+
565
+ # List of member names, which should be excluded from the protected access
566
+ # warning.
567
+ exclude-protected='''_asdict,
568
+ _fields,
569
+ _replace,
570
+ _source,
571
+ _make
572
+ '''
573
+
574
+ # List of valid names for the first argument in a class method.
575
+ valid-classmethod-first-arg='cls'
576
+
577
+ # List of valid names for the first argument in a metaclass class method.
578
+ valid-metaclass-classmethod-first-arg='cls'
579
+
580
+
581
+ [tool.pylint.DESIGN]
582
+
583
+ # Maximum number of arguments for function / method.
584
+ max-args=5
585
+
586
+ # Maximum number of attributes for a class (see R0902).
587
+ max-attributes=7
588
+
589
+ # Maximum number of boolean expressions in an if statement (see R0916).
590
+ max-bool-expr=5
591
+
592
+ # Maximum number of branch for function / method body.
593
+ max-branches=12
594
+
595
+ # Maximum number of locals for function / method body.
596
+ max-locals=15
597
+
598
+ # Maximum number of parents for a class (see R0901).
599
+ max-parents=7
600
+
601
+ # Maximum number of public methods for a class (see R0904).
602
+ max-public-methods=20
603
+
604
+ # Maximum number of return / yield for function / method body.
605
+ max-returns=6
606
+
607
+ # Maximum number of statements in function / method body.
608
+ max-statements=50
609
+
610
+ # Minimum number of public methods for a class (see R0903).
611
+ min-public-methods=2
612
+
613
+
614
+ [tool.pylint.EXCEPTIONS]
615
+
616
+ # Exceptions that will emit a warning when being caught. Defaults to
617
+ # "BaseException, Exception".
618
+ overgeneral-exceptions='''BaseException,
619
+ Exception
620
+ '''
testbed/atlassian-api__atlassian-python-api/requirements-dev.txt ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -r requirements.txt
2
+ mock
3
+ pytest
4
+ pytest-cov
5
+ flake8
6
+ black
7
+ tox
8
+ coverage
9
+ codecov
10
+ # used for example confluence attach file
11
+ python-magic
testbed/atlassian-api__atlassian-python-api/requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ deprecated
2
+ requests
3
+ six
4
+ oauthlib
5
+ requests_oauthlib
6
+ requests-kerberos
testbed/atlassian-api__atlassian-python-api/setup.cfg ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [pep8]
2
+ max-line-length = 120
3
+
4
+ [flake8]
5
+ max-line-length = 120
6
+ ignore = E203,E501
7
+ exclude = .tox,docs
8
+
9
+ [mypy]
10
+ ignore_missing_imports = True
11
+
12
+ [aliases]
13
+ test = pytest
14
+
15
+ [metadata]
16
+ description-file = README.rst
testbed/atlassian-api__atlassian-python-api/setup.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from setuptools import find_packages
3
+ from setuptools import setup
4
+
5
+ with open(os.path.join("atlassian", "VERSION")) as file:
6
+ version = file.read().strip()
7
+
8
+ with open("README.rst") as file:
9
+ long_description = file.read()
10
+
11
+ setup(
12
+ name="atlassian-python-api",
13
+ description="Python Atlassian REST API Wrapper",
14
+ long_description=long_description,
15
+ license="Apache License 2.0",
16
+ version=version,
17
+ download_url="https://github.com/atlassian-api/atlassian-python-api",
18
+ author="Matt Harasymczuk",
19
+ author_email="matt@astrotech.io",
20
+ maintainer="Gonchik Tsymzhitov",
21
+ maintainer_email="gonchik.tsymzhitov@gmail.com",
22
+ url="https://github.com/atlassian-api/atlassian-python-api",
23
+ keywords="atlassian jira core software confluence bitbucket bamboo crowd portfolio tempo servicedesk rest api",
24
+ packages=find_packages(),
25
+ package_dir={"atlassian": "atlassian"},
26
+ include_package_data=True,
27
+ zip_safe=False,
28
+ install_requires=["deprecated", "requests", "six", "oauthlib", "requests_oauthlib"],
29
+ extras_require={"kerberos": ['requests-kerberos']},
30
+ platforms="Platform Independent",
31
+ classifiers=[
32
+ "Development Status :: 4 - Beta",
33
+ "Environment :: Web Environment",
34
+ "Environment :: Console",
35
+ "Intended Audience :: Developers",
36
+ "Intended Audience :: System Administrators",
37
+ "Intended Audience :: Information Technology",
38
+ "License :: OSI Approved :: Apache Software License",
39
+ "Natural Language :: English",
40
+ "Operating System :: OS Independent",
41
+ "Operating System :: POSIX",
42
+ "Operating System :: MacOS :: MacOS X",
43
+ "Operating System :: Microsoft :: Windows",
44
+ "Programming Language :: Python",
45
+ "Programming Language :: Python :: 2.7",
46
+ "Programming Language :: Python :: 3.4",
47
+ "Programming Language :: Python :: 3.5",
48
+ "Programming Language :: Python :: 3.6",
49
+ "Programming Language :: Python :: 3.7",
50
+ "Programming Language :: Python :: 3.8",
51
+ "Programming Language :: Python :: 3.9",
52
+ "Topic :: Utilities",
53
+ "Topic :: Internet",
54
+ "Topic :: Internet :: WWW/HTTP",
55
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
56
+ "Topic :: Software Development :: Libraries :: Python Modules",
57
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
58
+ ],
59
+ )
testbed/atlassian-api__atlassian-python-api/tests/__init__.py ADDED
File without changes
testbed/atlassian-api__atlassian-python-api/tests/mockup.py ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding: utf8
2
+ import json
3
+ import os
4
+
5
+ from unittest.mock import Mock
6
+
7
+ from requests import Session, Response
8
+
9
+ SERVER = "https://my.test.server.com"
10
+ RESPONSE_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), "responses")
11
+
12
+
13
+ def mockup_server():
14
+ return SERVER
15
+
16
+
17
+ def request_mockup(*args, **kwargs):
18
+ method = kwargs["method"]
19
+ url = kwargs["url"]
20
+ if not url.startswith(SERVER + "/"):
21
+ raise ValueError("URL [{}] does not start with [{}/].".format(url, SERVER))
22
+ parts = url[len(SERVER) + 1 :].split("?")
23
+ url = parts[0]
24
+ response_key = parts[1] if len(parts) > 1 else None
25
+ if kwargs["data"] is not None:
26
+ response_key = str(kwargs["data"])
27
+
28
+ response = Response()
29
+ response.url = kwargs["url"]
30
+
31
+ response_file = os.path.join(RESPONSE_ROOT, url, method)
32
+ try:
33
+ with open(response_file, encoding="utf-8") as f:
34
+ data = {"responses": {}, "__builtins__": {}, "true": True, "false": False, "null": None}
35
+ exec(f.read(), data)
36
+ data = data["responses"][response_key]
37
+ if type(data) is dict:
38
+ if "status_code" in data:
39
+ response.status_code = data.pop("status_code")
40
+ else:
41
+ response.status_code = 200
42
+
43
+ # Extend the links with the server
44
+ for item in [None, "owner", "project", "workspace"]:
45
+ # Use values of paged response
46
+ for elem in data["values"] if "values" in data else [data]:
47
+ cur_dict = elem if item is None else elem.get(item, {})
48
+ if "links" in cur_dict:
49
+ for link in cur_dict["links"].values():
50
+ for ld in link if type(link) is list else [link]:
51
+ ld["href"] = "{}/{}".format(SERVER, ld["href"])
52
+ if "next" in data:
53
+ data["next"] = "{}/{}".format(SERVER, data["next"])
54
+
55
+ response.encoding = "utf-8"
56
+ response._content = bytes(json.dumps(data), response.encoding)
57
+ else:
58
+ response.status_code = 200
59
+ response._content = data
60
+ except FileNotFoundError:
61
+ response.encoding = "utf-8"
62
+ response._content = b"{}"
63
+ response.status_code = 404 # Not found
64
+ response.reason = "No stub defined [{}]".format(response_file)
65
+ except KeyError:
66
+ response.encoding = "utf-8"
67
+ response._content = b"{}"
68
+ response.status_code = 404 # Not found
69
+ response.reason = "No stub defined for key [{}] in [{}]".format(response_key, response_file)
70
+
71
+ return response
72
+
73
+
74
+ Session.request = Mock()
75
+ Session.request.side_effect = request_mockup
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/GET ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses[None] = {
2
+ "rendered": {
3
+ "description": {
4
+ "raw": "PRDescription",
5
+ "markup": "markdown",
6
+ "html": "<p>PRDescription</p>",
7
+ "type": "rendered",
8
+ },
9
+ "title": {"raw": "PRTitle", "markup": "markdown", "html": "<p>PRTitle</p>", "type": "rendered"},
10
+ },
11
+ "type": "pullrequest",
12
+ "description": "PRDescription",
13
+ "links": {
14
+ "decline": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/decline"},
15
+ "diffstat": {
16
+ "href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/diffstat/TestWorkspace1/testrepository1:16182c4698fb%0D1fbd047cd123?from_pullrequest_id=1"
17
+ },
18
+ "commits": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/commits"},
19
+ "self": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1"},
20
+ "comments": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/comments"},
21
+ "merge": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/merge"},
22
+ "html": {"href": "https://bitbucket.org/TestWorkspace1/testrepository1/pull-requests/1"},
23
+ "activity": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/activity"},
24
+ "request-changes": {
25
+ "href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/request-changes"
26
+ },
27
+ "diff": {
28
+ "href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/diff/TestWorkspace1/testrepository1:16182c4698fb%0D1fbd047cd123?from_pullrequest_id=1"
29
+ },
30
+ "approve": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/approve"},
31
+ "statuses": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/statuses"},
32
+ },
33
+ "title": "PRTitle",
34
+ "close_source_branch": true,
35
+ "reviewers": [
36
+ {
37
+ "display_name": "User04DisplayName",
38
+ "uuid": "{User04UUID}",
39
+ "links": {
40
+ "self": {"href": "users/%7BUser04UUID%7D"},
41
+ "html": {"href": "https://bitbucket.org/%7BUser04UUID%7D/"},
42
+ "avatar": {
43
+ "href": "https://secure.gravatar.com/avatar/ad2424dafaasdssaew12232344434432?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FU4-2.png"
44
+ },
45
+ },
46
+ "nickname": "User04Nickname",
47
+ "type": "user",
48
+ "account_id": "User04AccountID",
49
+ },
50
+ {
51
+ "display_name": "User02DisplayName",
52
+ "uuid": "{User02UUID}",
53
+ "links": {
54
+ "self": {"href": "users/%7BUser02UUID%7D"},
55
+ "html": {"href": "https://bitbucket.org/%7BUser02UUID%7D/"},
56
+ "avatar": {
57
+ "href": "https://secure.gravatar.com/avatar/ad2424dafaasdssaew12232344434432?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FU2-3.png"
58
+ },
59
+ },
60
+ "nickname": "User02Nickname",
61
+ "type": "user",
62
+ "account_id": "User02AccountID",
63
+ },
64
+ {
65
+ "display_name": "User01DisplayName",
66
+ "uuid": "{User01UUID}",
67
+ "links": {
68
+ "self": {"href": "users/%7BUser01UUID%7D"},
69
+ "html": {"href": "https://bitbucket.org/%7BUser01UUID%7D/"},
70
+ "avatar": {
71
+ "href": "https://secure.gravatar.com/avatar/ad2424dafaasdssaew12232344434432?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FU1-3.png"
72
+ },
73
+ },
74
+ "nickname": "User01Nickname",
75
+ "type": "user",
76
+ "account_id": "User01AccountID",
77
+ },
78
+ ],
79
+ "id": 1,
80
+ "destination": {
81
+ "commit": {
82
+ "hash": "1fbd047cd99a",
83
+ "type": "commit",
84
+ "links": {
85
+ "self": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/commit/1fbd047cd99a"},
86
+ "html": {"href": "https://bitbucket.org/TestWorkspace1/testrepository1/commits/1fbd047cd99a"},
87
+ },
88
+ },
89
+ "repository": {
90
+ "links": {
91
+ "self": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1"},
92
+ "html": {"href": "https://bitbucket.org/TestWorkspace1/testrepository1"},
93
+ "avatar": {"href": "https://bytebucket.org/ravatar/%7BRepoUUID%7D?ts=default"},
94
+ },
95
+ "type": "repository",
96
+ "name": "testrepository1",
97
+ "full_name": "TestWorkspace1/testrepository1",
98
+ "uuid": "{RepoUUID}",
99
+ },
100
+ "branch": {"name": "master"},
101
+ },
102
+ "created_on": "2020-03-19T12:00:03.494356+00:00",
103
+ "summary": {"raw": "PRDescription", "markup": "markdown", "html": "<p>PRDescription</p>", "type": "rendered"},
104
+ "source": {
105
+ "commit": {
106
+ "hash": "16182c4123fb",
107
+ "type": "commit",
108
+ "links": {
109
+ "self": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/commit/16182c4123fb"},
110
+ "html": {"href": "https://bitbucket.org/TestWorkspace1/testrepository1/commits/16182c4123fb"},
111
+ },
112
+ },
113
+ "repository": {
114
+ "links": {
115
+ "self": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1"},
116
+ "html": {"href": "https://bitbucket.org/TestWorkspace1/testrepository1"},
117
+ "avatar": {"href": "https://bytebucket.org/ravatar/%7BRepoUUID%7D?ts=default"},
118
+ },
119
+ "type": "repository",
120
+ "name": "testrepository1",
121
+ "full_name": "TestWorkspace1/testrepository1",
122
+ "uuid": "{RepoUUID}",
123
+ },
124
+ "branch": {"name": "feature/test-branch"},
125
+ },
126
+ "comment_count": 5,
127
+ "state": "OPEN",
128
+ "task_count": 0,
129
+ "participants": [
130
+ {
131
+ "participated_on": "2020-03-19T14:29:24.928709+00:00",
132
+ "state": null,
133
+ "role": "PARTICIPANT",
134
+ "user": {
135
+ "display_name": "User05DisplayName",
136
+ "uuid": "{User05UUID}",
137
+ "links": {
138
+ "self": {"href": "users/%7BUser05UUID%7D"},
139
+ "html": {"href": "https://bitbucket.org/%7BUser05UUID%7D/"},
140
+ "avatar": {
141
+ "href": "https://secure.gravatar.com/avatar/ad2424dafaasdssaew12232344434432?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2U5-5.png"
142
+ },
143
+ },
144
+ "nickname": "User05Nickname",
145
+ "type": "user",
146
+ "account_id": "User05AccountID",
147
+ },
148
+ "type": "participant",
149
+ "approved": false,
150
+ },
151
+ {
152
+ "participated_on": "2020-07-09T07:00:54.416331+00:00",
153
+ "state": null,
154
+ "role": "PARTICIPANT",
155
+ "user": {
156
+ "display_name": "User03DisplayName",
157
+ "uuid": "{User03UUID}",
158
+ "links": {
159
+ "self": {"href": "users/%7BUser03UUID%7D"},
160
+ "html": {"href": "https://bitbucket.org/%7BUser03UUID%7D/"},
161
+ "avatar": {
162
+ "href": "https://secure.gravatar.com/avatar/ad2424dafaasdssaew12232344434432?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FU3-0.png"
163
+ },
164
+ },
165
+ "nickname": "User03Nickname",
166
+ "type": "user",
167
+ "account_id": "User03AccountID",
168
+ },
169
+ "type": "participant",
170
+ "approved": false,
171
+ },
172
+ {
173
+ "participated_on": "2020-12-27T14:09:14.660262+00:00",
174
+ "state": "approved",
175
+ "role": "REVIEWER",
176
+ "user": {
177
+ "display_name": "User04DisplayName",
178
+ "uuid": "{User04UUID}",
179
+ "links": {
180
+ "self": {"href": "users/%7BUser04UUID%7D"},
181
+ "html": {"href": "https://bitbucket.org/%7BUser04UUID%7D/"},
182
+ "avatar": {
183
+ "href": "https://secure.gravatar.com/avatar/ad2424dafaasdssaew12232344434432?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FU4-2.png"
184
+ },
185
+ },
186
+ "nickname": "User04Nickname",
187
+ "type": "user",
188
+ "account_id": "User04AccountID",
189
+ },
190
+ "type": "participant",
191
+ "approved": true,
192
+ },
193
+ {
194
+ "participated_on": "2020-12-27T14:05:58.999476+00:00",
195
+ "state": "changes_requested",
196
+ "role": "REVIEWER",
197
+ "user": {
198
+ "display_name": "User01DisplayName",
199
+ "uuid": "{User01UUID}",
200
+ "links": {
201
+ "self": {"href": "users/%7BUser01UUID%7D"},
202
+ "html": {"href": "https://bitbucket.org/%7BUser01UUID%7D/"},
203
+ "avatar": {
204
+ "href": "https://secure.gravatar.com/avatar/ad2424dafaasdssaew12232344434432?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FU1-3.png"
205
+ },
206
+ },
207
+ "nickname": "User01Nickname",
208
+ "type": "user",
209
+ "account_id": "User01AccountID",
210
+ },
211
+ "type": "participant",
212
+ "approved": false,
213
+ },
214
+ {
215
+ "participated_on": null,
216
+ "state": null,
217
+ "role": "REVIEWER",
218
+ "user": {
219
+ "display_name": "User02DisplayName",
220
+ "uuid": "{User02UUID}",
221
+ "links": {
222
+ "self": {"href": "users/%7BUser02UUID%7D"},
223
+ "html": {"href": "https://bitbucket.org/%7BUser02UUID%7D/"},
224
+ "avatar": {
225
+ "href": "https://secure.gravatar.com/avatar/ad2424dafaasdssaew12232344434432?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FU2-3.png"
226
+ },
227
+ },
228
+ "nickname": "User02Nickname",
229
+ "type": "user",
230
+ "account_id": "User02AccountID",
231
+ },
232
+ "type": "participant",
233
+ "approved": false,
234
+ },
235
+ ],
236
+ "reason": "",
237
+ "updated_on": "2020-12-27T14:09:14.660262+00:00",
238
+ "author": {
239
+ "display_name": "User03DisplayName",
240
+ "uuid": "{User03UUID}",
241
+ "links": {
242
+ "self": {"href": "users/%7BUser03UUID%7D"},
243
+ "html": {"href": "https://bitbucket.org/%7BUser03UUID%7D/"},
244
+ "avatar": {
245
+ "href": "https://secure.gravatar.com/avatar/ad2424dafaasdssaew12232344434432?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FU3-0.png"
246
+ },
247
+ },
248
+ "nickname": "User03Nickname",
249
+ "type": "user",
250
+ "account_id": "User03AccountID",
251
+ },
252
+ "merge_commit": null,
253
+ "closed_by": null,
254
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace1/GET ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses[None] = {
2
+ "created_on": "2020-10-28T12:00:00.0+00:00",
3
+ "is_private": True,
4
+ "links": {
5
+ "avatar": {"href": "https://bitbucket.org/workspaces/TestWorkspace1/avatar/?ts=1604430491"},
6
+ "html": {"href": "https://bitbucket.org/TestWorkspace1/"},
7
+ "members": {"href": "bitbucket/cloud/2.0/workspaces/TestWorkspace1/members"},
8
+ "owners": {"href": "bitbucket/cloud/2.0/workspaces/TestWorkspace1/members?q=permission%3D%22owner%22"},
9
+ "projects": {"href": "bitbucket/cloud/2.0/workspaces/TestWorkspace1/projects"},
10
+ "repositories": {"href": "bitbucket/cloud/2.0/repositories/TestWorkspace1"},
11
+ "self": {"href": "bitbucket/cloud/2.0/workspaces/TestWorkspace1"},
12
+ "snippets": {"href": "bitbucket/cloud/2.0/snippets/TestWorkspace1"},
13
+ },
14
+ "name": "TestWorkspace1",
15
+ "slug": "TestWorkspace1",
16
+ "type": "workspace",
17
+ "uuid": "{TestWorkspace1Uuid}",
18
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/DELETE ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ responses["name=group_a"] = {
2
+ "status_code": 204
3
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/none/GET ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses = {
2
+ None: {
3
+ "size": 2,
4
+ "limit": 25,
5
+ "isLastPage": true,
6
+ "values": [
7
+ {"name": "group_a_1", "deletable": true},
8
+ {"name": "group_b_1", "deletable": false},
9
+ ],
10
+ "start": 0,
11
+ },
12
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/DELETE ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ responses["name=jcitizen1"] = {
2
+ "status_code": 204
3
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/none/GET ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses = {
2
+ None: {
3
+ "size": 1,
4
+ "limit": 25,
5
+ "isLastPage": true,
6
+ "values": [
7
+ {
8
+ "name": "jcitizen1_1",
9
+ "emailAddress": "jane1_1@example.com",
10
+ "id": 1011,
11
+ "displayName": "Jane Citizen 1_1",
12
+ "active": true,
13
+ "slug": "jcitizen1_1_slug",
14
+ "type": "NORMAL",
15
+ },
16
+ ],
17
+ "start": 0,
18
+ },
19
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/GET ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses[None] = {
2
+ "size": 2,
3
+ "limit": 25,
4
+ "isLastPage": true,
5
+ "values": [
6
+ {
7
+ "key": "PRJ",
8
+ "id": 1,
9
+ "name": "My Cool Project",
10
+ "description": "The description for my cool project.",
11
+ "public": true,
12
+ "type": "NORMAL",
13
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
14
+ },
15
+ {
16
+ "key": "PRJ1",
17
+ "id": 2,
18
+ "name": "My Cool Project 1",
19
+ "description": "The description for my cool project 1.",
20
+ "public": true,
21
+ "type": "NORMAL",
22
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ1"}]},
23
+ },
24
+ ],
25
+ "start": 0,
26
+ }
27
+ responses["name=My+Cool+Project"] = responses[None]
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/GET ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ responses[None] = {
2
+ "key": "PRJ",
3
+ "id": 1,
4
+ "name": "My Cool Project",
5
+ "description": "The description for my cool project.",
6
+ "public": true,
7
+ "type": "NORMAL",
8
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
9
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/PUT ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses['{"name": "New name"}'] = {
2
+ "key": "PRJ",
3
+ "id": 1,
4
+ "name": "New name",
5
+ "description": "The description for my cool project.",
6
+ "public": true,
7
+ "type": "NORMAL",
8
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
9
+ }
10
+ responses['{"key": "NEWKEY"}'] = {
11
+ "key": "NEWKEY",
12
+ "id": 1,
13
+ "name": "My Cool Project",
14
+ "description": "The description for my cool project.",
15
+ "public": true,
16
+ "type": "NORMAL",
17
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/NEWKEY"}]},
18
+ }
19
+ responses['{"description": "New description."}'] = {
20
+ "key": "PRJ",
21
+ "id": 1,
22
+ "name": "My Cool Project",
23
+ "description": "New description.",
24
+ "public": true,
25
+ "type": "NORMAL",
26
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
27
+ }
28
+ responses['{"public": false}'] = {
29
+ "key": "PRJ",
30
+ "id": 1,
31
+ "name": "My Cool Project",
32
+ "description": "The description for my cool project.",
33
+ "public": false,
34
+ "type": "NORMAL",
35
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
36
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/DELETE ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ responses["name=group_a"] = {
2
+ "status_code": 204
3
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/GET ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses = {
2
+ None: {
3
+ "size": 3,
4
+ "limit": 25,
5
+ "isLastPage": true,
6
+ "values": [
7
+ {"group": {"name": "group_a"}, "permission": "ADMIN"},
8
+ {"group": {"name": "group_b"}, "permission": "WRITE"},
9
+ {"group": {"name": "group_c"}, "permission": "READ"},
10
+ ],
11
+ "start": 0,
12
+ },
13
+ "filter=group_a": {
14
+ "size": 1,
15
+ "limit": 25,
16
+ "isLastPage": true,
17
+ "values": [
18
+ {"group": {"name": "group_a"}, "permission": "ADMIN"},
19
+ ],
20
+ "start": 0,
21
+ },
22
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/none/GET ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses = {
2
+ None: {
3
+ "size": 2,
4
+ "limit": 25,
5
+ "isLastPage": true,
6
+ "values": [
7
+ {"name": "group_a_1", "deletable": true},
8
+ {"name": "group_b_1", "deletable": true},
9
+ ],
10
+ "start": 0,
11
+ },
12
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/DELETE ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ responses["name=jcitizen1"] = {
2
+ "status_code": 204
3
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/GET ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses = {
2
+ None: {
3
+ "size": 3,
4
+ "limit": 25,
5
+ "isLastPage": true,
6
+ "values": [
7
+ {
8
+ "user": {
9
+ "name": "jcitizen1",
10
+ "emailAddress": "jane1@example.com",
11
+ "id": 101,
12
+ "displayName": "Jane Citizen 1",
13
+ "active": true,
14
+ "slug": "jcitizen1_slug",
15
+ "type": "NORMAL",
16
+ },
17
+ "permission": "ADMIN",
18
+ },
19
+ {
20
+ "user": {
21
+ "name": "jcitizen2",
22
+ "emailAddress": "jane2@example.com",
23
+ "id": 102,
24
+ "displayName": "Jane Citizen 2",
25
+ "active": true,
26
+ "slug": "jcitizen2_slug",
27
+ "type": "NORMAL",
28
+ },
29
+ "permission": "WRITE",
30
+ },
31
+ {
32
+ "user": {
33
+ "name": "jcitizen3",
34
+ "emailAddress": "jane3@example.com",
35
+ "id": 103,
36
+ "displayName": "Jane Citizen 3",
37
+ "active": false,
38
+ "slug": "jcitizen3_slug",
39
+ "type": "NORMAL",
40
+ },
41
+ "permission": "READ",
42
+ },
43
+ ],
44
+ "start": 0,
45
+ },
46
+ "filter=jcitizen1": {
47
+ "size": 1,
48
+ "limit": 25,
49
+ "isLastPage": true,
50
+ "values": [
51
+ {
52
+ "user": {
53
+ "name": "jcitizen1",
54
+ "emailAddress": "jane1@example.com",
55
+ "id": 101,
56
+ "displayName": "Jane Citizen 1",
57
+ "active": true,
58
+ "slug": "jcitizen1_slug",
59
+ "type": "NORMAL",
60
+ },
61
+ "permission": "ADMIN",
62
+ },
63
+ ],
64
+ "start": 0,
65
+ },
66
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/GET ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses[None] = {
2
+ "size": 3,
3
+ "limit": 2,
4
+ "isLastPage": false,
5
+ "values": [
6
+ {
7
+ "slug": "my-repo1-slug",
8
+ "id": 1,
9
+ "name": "My repo 1",
10
+ "description": "My repo 1 description",
11
+ "hierarchyId": "e3c939f9ef4a7fae272e",
12
+ "scmId": "git",
13
+ "state": "AVAILABLE",
14
+ "statusMessage": "Available",
15
+ "forkable": true,
16
+ "project": {
17
+ "key": "PRJ",
18
+ "id": 1,
19
+ "name": "My Cool Project",
20
+ "description": "The description for my cool project.",
21
+ "public": true,
22
+ "type": "NORMAL",
23
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
24
+ },
25
+ "public": true,
26
+ "links": {
27
+ "clone": [
28
+ {"href": "ssh://git@<baseURL>/PRJ/my-repo1.git", "name": "ssh"},
29
+ {"href": "https://<baseURL>/scm/PRJ/my-repo1.git", "name": "http"},
30
+ ],
31
+ "self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug"}],
32
+ },
33
+ },
34
+ {
35
+ "slug": "my-repo2-slug",
36
+ "id": 2,
37
+ "name": "My repo 2",
38
+ "description": "My repo 2 description",
39
+ "hierarchyId": "e3c939f9ef4a7fae272e",
40
+ "scmId": "git",
41
+ "state": "AVAILABLE",
42
+ "statusMessage": "Available",
43
+ "forkable": true,
44
+ "project": {
45
+ "key": "PRJ",
46
+ "id": 1,
47
+ "name": "My Cool Project",
48
+ "description": "The description for my cool project.",
49
+ "public": true,
50
+ "type": "NORMAL",
51
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
52
+ },
53
+ "public": true,
54
+ "links": {
55
+ "clone": [
56
+ {"href": "ssh://git@<baseURL>/PRJ/my-repo2.git", "name": "ssh"},
57
+ {"href": "https://<baseURL>/scm/PRJ/my-repo2.git", "name": "http"},
58
+ ],
59
+ "self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo2-slug"}],
60
+ },
61
+ },
62
+ ],
63
+ "start": 0,
64
+ "nextPageStart": 5,
65
+ }
66
+ responses["start=5"] = {
67
+ "size": 3,
68
+ "limit": 2,
69
+ "isLastPage": true,
70
+ "values": [
71
+ {
72
+ "slug": "my-repo3-slug",
73
+ "id": 3,
74
+ "name": "My repo 3",
75
+ "description": "My repo 3 description",
76
+ "hierarchyId": "e3c939f9ef4a7fae272e",
77
+ "scmId": "git",
78
+ "state": "AVAILABLE",
79
+ "statusMessage": "Available",
80
+ "forkable": true,
81
+ "project": {
82
+ "key": "PRJ",
83
+ "id": 1,
84
+ "name": "My Cool Project",
85
+ "description": "The description for my cool project.",
86
+ "public": true,
87
+ "type": "NORMAL",
88
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
89
+ },
90
+ "public": true,
91
+ "links": {
92
+ "clone": [
93
+ {"href": "ssh://git@<baseURL>/PRJ/my-repo3.git", "name": "ssh"},
94
+ {"href": "https://<baseURL>/scm/PRJ/my-repo3.git", "name": "http"},
95
+ ],
96
+ "self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo3-slug"}],
97
+ },
98
+ },
99
+ ],
100
+ "start": 1,
101
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/GET ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses[None] = {
2
+ "slug": "my-repo1-slug",
3
+ "id": 1,
4
+ "name": "My repo 1",
5
+ "description": "My repo 1 description",
6
+ "hierarchyId": "e3c939f9ef4a7fae272e",
7
+ "scmId": "git",
8
+ "state": "AVAILABLE",
9
+ "statusMessage": "Available",
10
+ "forkable": true,
11
+ "project": {
12
+ "key": "PRJ",
13
+ "id": 1,
14
+ "name": "My Cool Project",
15
+ "description": "The description for my cool project.",
16
+ "public": true,
17
+ "type": "NORMAL",
18
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
19
+ },
20
+ "public": true,
21
+ "links": {
22
+ "clone": [
23
+ {"href": "ssh://git@<baseURL>/PRJ/my-repo1.git", "name": "ssh"},
24
+ {"href": "https://<baseURL>/scm/PRJ/my-repo1.git", "name": "http"},
25
+ ],
26
+ "self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug"}],
27
+ },
28
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/PUT ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses = {
2
+ '{"name": "New name"}': {
3
+ "slug": "my-repo1-slug",
4
+ "id": 1,
5
+ "name": "New name",
6
+ "description": "My repo 1 description",
7
+ "hierarchyId": "e3c939f9ef4a7fae272e",
8
+ "scmId": "git",
9
+ "state": "AVAILABLE",
10
+ "statusMessage": "Available",
11
+ "forkable": true,
12
+ "project": {
13
+ "key": "PRJ",
14
+ "id": 1,
15
+ "name": "My Cool Project",
16
+ "description": "The description for my cool project.",
17
+ "public": true,
18
+ "type": "NORMAL",
19
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
20
+ },
21
+ "public": true,
22
+ "links": {
23
+ "clone": [
24
+ {"href": "ssh://git@<baseURL>/PRJ/my-repo1.git", "name": "ssh"},
25
+ {"href": "https://<baseURL>/scm/PRJ/my-repo1.git", "name": "http"},
26
+ ],
27
+ "self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1"}],
28
+ },
29
+ },
30
+ '{"description": "New description."}': {
31
+ "slug": "my-repo1-slug",
32
+ "id": 1,
33
+ "name": "My repo 1",
34
+ "description": "New description.",
35
+ "hierarchyId": "e3c939f9ef4a7fae272e",
36
+ "scmId": "git",
37
+ "state": "AVAILABLE",
38
+ "statusMessage": "Available",
39
+ "forkable": true,
40
+ "project": {
41
+ "key": "PRJ",
42
+ "id": 1,
43
+ "name": "My Cool Project",
44
+ "description": "The description for my cool project.",
45
+ "public": true,
46
+ "type": "NORMAL",
47
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
48
+ },
49
+ "public": true,
50
+ "links": {
51
+ "clone": [
52
+ {"href": "ssh://git@<baseURL>/PRJ/my-repo1.git", "name": "ssh"},
53
+ {"href": "https://<baseURL>/scm/PRJ/my-repo1.git", "name": "http"},
54
+ ],
55
+ "self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1"}],
56
+ },
57
+ },
58
+ '{"public": false}': {
59
+ "slug": "my-repo1-slug",
60
+ "id": 1,
61
+ "name": "My repo 1",
62
+ "description": "My repo 1 description",
63
+ "hierarchyId": "e3c939f9ef4a7fae272e",
64
+ "scmId": "git",
65
+ "state": "AVAILABLE",
66
+ "statusMessage": "Available",
67
+ "forkable": true,
68
+ "project": {
69
+ "key": "PRJ",
70
+ "id": 1,
71
+ "name": "My Cool Project",
72
+ "description": "The description for my cool project.",
73
+ "public": true,
74
+ "type": "NORMAL",
75
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
76
+ },
77
+ "public": false,
78
+ "links": {
79
+ "clone": [
80
+ {"href": "ssh://git@<baseURL>/PRJ/my-repo1.git", "name": "ssh"},
81
+ {"href": "https://<baseURL>/scm/PRJ/my-repo1.git", "name": "http"},
82
+ ],
83
+ "self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1"}],
84
+ },
85
+ },
86
+ '{"forkable": false}': {
87
+ "slug": "my-repo1-slug",
88
+ "id": 1,
89
+ "name": "My repo 1",
90
+ "description": "My repo 1 description",
91
+ "hierarchyId": "e3c939f9ef4a7fae272e",
92
+ "scmId": "git",
93
+ "state": "AVAILABLE",
94
+ "statusMessage": "Available",
95
+ "forkable": false,
96
+ "project": {
97
+ "key": "PRJ",
98
+ "id": 1,
99
+ "name": "My Cool Project",
100
+ "description": "The description for my cool project.",
101
+ "public": true,
102
+ "type": "NORMAL",
103
+ "links": {"self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ"}]},
104
+ },
105
+ "public": true,
106
+ "links": {
107
+ "clone": [
108
+ {"href": "ssh://git@<baseURL>/PRJ/my-repo1.git", "name": "ssh"},
109
+ {"href": "https://<baseURL>/scm/PRJ/my-repo1.git", "name": "http"},
110
+ ],
111
+ "self": [{"href": "bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1"}],
112
+ },
113
+ },
114
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/contributing/GET ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ responses = {
2
+ None: b"Test contributing.md",
3
+ "at=CommitId": b"Test contributing.md at CommitId",
4
+ "at=CommitId&markup=True": b"<p>Test rendered contributing.md at CommitId</p>",
5
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/GET ADDED
@@ -0,0 +1 @@
 
 
1
+ responses[None] = {"id": "refs/heads/main", "displayId": "main", "type": "BRANCH"}
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/PUT ADDED
@@ -0,0 +1 @@
 
 
1
+ responses['{"id": "refs/heads/maint/relx"}'] = {}
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/forks/GET ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses[None] = {
2
+ "size": 1,
3
+ "limit": 25,
4
+ "isLastPage": true,
5
+ "values": [
6
+ {
7
+ "slug": "my-repo",
8
+ "id": 2,
9
+ "name": "My repo",
10
+ "description": "My repo description",
11
+ "hierarchyId": "e3c939f9ef4a7fae272e",
12
+ "scmId": "git",
13
+ "state": "AVAILABLE",
14
+ "statusMessage": "Available",
15
+ "forkable": true,
16
+ "origin": {
17
+ "slug": "my-repo",
18
+ "id": 1,
19
+ "name": "My repo",
20
+ "description": "My repo description",
21
+ "hierarchyId": "e3c939f9ef4a7fae272e",
22
+ "scmId": "git",
23
+ "state": "AVAILABLE",
24
+ "statusMessage": "Available",
25
+ "forkable": true,
26
+ "project": {
27
+ "key": "PRJ",
28
+ "id": 1,
29
+ "name": "My Cool Project",
30
+ "description": "The description for my cool project.",
31
+ "public": true,
32
+ "type": "NORMAL",
33
+ "links": {"self": [{"href": "http://link/to/project"}]},
34
+ },
35
+ "public": true,
36
+ "links": {
37
+ "clone": [
38
+ {"href": "ssh://git@<baseURL>/PRJ/my-repo.git", "name": "ssh"},
39
+ {"href": "https://<baseURL>/scm/PRJ/my-repo.git", "name": "http"},
40
+ ],
41
+ "self": [{"href": "http://link/to/repository"}],
42
+ },
43
+ },
44
+ "project": {
45
+ "key": "~JDOE",
46
+ "id": 2,
47
+ "name": "John Doe",
48
+ "type": "PERSONAL",
49
+ "links": {"self": [{"href": "http://link/to/project"}]},
50
+ },
51
+ "links": {
52
+ "clone": [
53
+ {"href": "https://<baseURL>/scm/JDOE/my-repo.git", "name": "http"},
54
+ {"href": "ssh://git@<baseURL>/JDOE/my-repo.git", "name": "ssh"},
55
+ ],
56
+ "self": [{"href": "http://link/to/repository"}],
57
+ },
58
+ }
59
+ ],
60
+ "start": 0,
61
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/license/GET ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ responses = {
2
+ None: b"Test license.md",
3
+ "at=CommitId": b"Test license.md at CommitId",
4
+ "at=CommitId&markup=True": b"<p>Test rendered license.md at CommitId</p>",
5
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/DELETE ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ responses["name=group_a"] = {
2
+ "status_code": 204
3
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/GET ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses = {
2
+ None: {
3
+ "size": 3,
4
+ "limit": 25,
5
+ "isLastPage": true,
6
+ "values": [
7
+ {"group": {"name": "group_a"}, "permission": "ADMIN"},
8
+ {"group": {"name": "group_b"}, "permission": "WRITE"},
9
+ {"group": {"name": "group_c"}, "permission": "READ"},
10
+ ],
11
+ "start": 0,
12
+ },
13
+ "filter=group_a": {
14
+ "size": 1,
15
+ "limit": 25,
16
+ "isLastPage": true,
17
+ "values": [
18
+ {"group": {"name": "group_a"}, "permission": "ADMIN"},
19
+ ],
20
+ "start": 0,
21
+ },
22
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/none/GET ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses = {
2
+ None: {
3
+ "size": 2,
4
+ "limit": 25,
5
+ "isLastPage": true,
6
+ "values": [
7
+ {"name": "group_a_1", "deletable": true},
8
+ {"name": "group_b_1", "deletable": true},
9
+ ],
10
+ "start": 0,
11
+ },
12
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/DELETE ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ responses["name=jcitizen1"] = {
2
+ "status_code": 204
3
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/GET ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses = {
2
+ None: {
3
+ "size": 3,
4
+ "limit": 25,
5
+ "isLastPage": true,
6
+ "values": [
7
+ {
8
+ "user": {
9
+ "name": "jcitizen1",
10
+ "emailAddress": "jane1@example.com",
11
+ "id": 101,
12
+ "displayName": "Jane Citizen 1",
13
+ "active": true,
14
+ "slug": "jcitizen1_slug",
15
+ "type": "NORMAL",
16
+ },
17
+ "permission": "ADMIN",
18
+ },
19
+ {
20
+ "user": {
21
+ "name": "jcitizen2",
22
+ "emailAddress": "jane2@example.com",
23
+ "id": 102,
24
+ "displayName": "Jane Citizen 2",
25
+ "active": true,
26
+ "slug": "jcitizen2_slug",
27
+ "type": "NORMAL",
28
+ },
29
+ "permission": "WRITE",
30
+ },
31
+ {
32
+ "user": {
33
+ "name": "jcitizen3",
34
+ "emailAddress": "jane3@example.com",
35
+ "id": 103,
36
+ "displayName": "Jane Citizen 3",
37
+ "active": false,
38
+ "slug": "jcitizen3_slug",
39
+ "type": "NORMAL",
40
+ },
41
+ "permission": "READ",
42
+ },
43
+ ],
44
+ "start": 0,
45
+ },
46
+ "filter=jcitizen1": {
47
+ "size": 1,
48
+ "limit": 25,
49
+ "isLastPage": true,
50
+ "values": [
51
+ {
52
+ "user": {
53
+ "name": "jcitizen1",
54
+ "emailAddress": "jane1@example.com",
55
+ "id": 101,
56
+ "displayName": "Jane Citizen 1",
57
+ "active": true,
58
+ "slug": "jcitizen1_slug",
59
+ "type": "NORMAL",
60
+ },
61
+ "permission": "ADMIN",
62
+ },
63
+ ],
64
+ "start": 0,
65
+ },
66
+ }
testbed/atlassian-api__atlassian-python-api/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/none/GET ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ responses = {
2
+ None: {
3
+ "size": 1,
4
+ "limit": 25,
5
+ "isLastPage": true,
6
+ "values": [
7
+ {
8
+ "name": "jcitizen1_1",
9
+ "emailAddress": "jane1_1@example.com",
10
+ "id": 1011,
11
+ "displayName": "Jane Citizen 1_1",
12
+ "active": true,
13
+ "slug": "jcitizen1_1_slug",
14
+ "type": "NORMAL",
15
+ },
16
+ ],
17
+ "start": 0,
18
+ },
19
+ }