FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab/tools/functional/api/test_deploy_keys.py at master · la3mmchen/python-gitlab · GitHub
la3mmchen
python-gitlab
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-gitlab
/
tools
/
functional
/
api
/
test_deploy_keys.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
12 lines (10 loc) · 466 Bytes
Breadcrumbs
python-gitlab
/
tools
/
functional
/
api
/
test_deploy_keys.py
Copy path
File metadata and controls
12 lines (10 loc) · 466 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
def
test_project_deploy_keys
(
gl
,
project
,
DEPLOY_KEY
):
deploy_key
=
project
.
keys
.
create
({
"title"
:
"foo@bar"
,
"key"
:
DEPLOY_KEY
})
project_keys
=
list
(
project
.
keys
.
list
())
assert
len
(
project_keys
)
==
1
project2
=
gl
.
projects
.
create
({
"name"
:
"deploy-key-project"
})
project2
.
keys
.
enable
(
deploy_key
.
id
)
assert
len
(
project2
.
keys
.
list
())
==
1
project2
.
keys
.
delete
(
deploy_key
.
id
)
assert
len
(
project2
.
keys
.
list
())
==
0
project2
.
delete
()
Back
|
FazBrowse Home
|
New Git URL