FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab/tests/functional/api/test_push_rules.py at v8.6.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_push_rules.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (18 loc) · 710 Bytes
Breadcrumbs
python-gitlab
/
tests
/
functional
/
api
/
test_push_rules.py
Copy path
File metadata and controls
26 lines (18 loc) · 710 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
21
22
23
24
25
26
import
pytest
import
gitlab
@
pytest
.
mark
.
gitlab_premium
def
test_project_push_rules
(
project
):
with
pytest
.
raises
(
gitlab
.
GitlabParsingError
):
# when no rules are defined the API call returns back `None` which
# causes a gitlab.GitlabParsingError in RESTObject.__init__()
project
.
pushrules
.
get
()
push_rules
=
project
.
pushrules
.
create
({
"deny_delete_tag"
:
True
})
assert
push_rules
.
deny_delete_tag
push_rules
.
deny_delete_tag
=
False
push_rules
.
save
()
push_rules
=
project
.
pushrules
.
get
()
assert
push_rules
assert
not
push_rules
.
deny_delete_tag
push_rules
.
delete
()
with
pytest
.
raises
(
gitlab
.
GitlabParsingError
):
project
.
pushrules
.
get
()
Back
|
FazBrowse Home
|
New Git URL