FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab/tests/functional/api/test_deploy_keys.py at v8.0.0 · python-gitlab/python-gitlab · GitHub
python-gitlab
python-gitlab
Repository navigation
Code
Issues
16
(16)
Pull requests
15
(15)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-gitlab
/
tests
/
functional
/
api
/
test_deploy_keys.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (13 loc) · 690 Bytes
Breadcrumbs
python-gitlab
/
tests
/
functional
/
api
/
test_deploy_keys.py
Copy path
File metadata and controls
20 lines (13 loc) · 690 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
13
14
15
16
17
18
19
20
from
gitlab
import
Gitlab
from
gitlab
.
v4
.
objects
import
Project
def
test_deploy_keys
(
gl
:
Gitlab
,
DEPLOY_KEY
:
str
)
->
None
:
deploy_key
=
gl
.
deploykeys
.
create
({
"title"
:
"foo@bar"
,
"key"
:
DEPLOY_KEY
})
assert
deploy_key
in
gl
.
deploykeys
.
list
(
get_all
=
False
)
def
test_project_deploy_keys
(
gl
:
Gitlab
,
project
:
Project
,
DEPLOY_KEY
:
str
)
->
None
:
deploy_key
=
project
.
keys
.
create
({
"title"
:
"foo@bar"
,
"key"
:
DEPLOY_KEY
})
assert
deploy_key
in
project
.
keys
.
list
()
project2
=
gl
.
projects
.
create
({
"name"
:
"deploy-key-project"
})
project2
.
keys
.
enable
(
deploy_key
.
id
)
assert
deploy_key
in
project2
.
keys
.
list
()
project2
.
keys
.
delete
(
deploy_key
.
id
)
project2
.
delete
()
Back
|
FazBrowse Home
|
New Git URL