FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab/tests/functional/cli/test_cli_packages.py at main · 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
/
cli
/
test_cli_packages.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
60 lines (47 loc) · 1.29 KB
Breadcrumbs
python-gitlab
/
tests
/
functional
/
cli
/
test_cli_packages.py
Copy path
File metadata and controls
60 lines (47 loc) · 1.29 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package_name
=
"hello-world"
package_version
=
"v1.0.0"
file_name
=
"hello.tar.gz"
file_content
=
"package content"
def
test_list_project_packages
(
gitlab_cli
,
project
):
cmd
=
[
"project-package"
,
"list"
,
"--project-id"
,
project
.
id
]
ret
=
gitlab_cli
(
cmd
)
assert
ret
.
success
def
test_list_group_packages
(
gitlab_cli
,
group
):
cmd
=
[
"group-package"
,
"list"
,
"--group-id"
,
group
.
id
]
ret
=
gitlab_cli
(
cmd
)
assert
ret
.
success
def
test_upload_generic_package
(
tmp_path
,
gitlab_cli
,
project
):
path
=
tmp_path
/
file_name
path
.
write_text
(
file_content
)
cmd
=
[
"-v"
,
"generic-package"
,
"upload"
,
"--project-id"
,
project
.
id
,
"--package-name"
,
package_name
,
"--path"
,
path
,
"--package-version"
,
package_version
,
"--file-name"
,
file_name
,
]
ret
=
gitlab_cli
(
cmd
)
assert
"201 Created"
in
ret
.
stdout
def
test_download_generic_package
(
gitlab_cli
,
project
):
cmd
=
[
"generic-package"
,
"download"
,
"--project-id"
,
project
.
id
,
"--package-name"
,
package_name
,
"--package-version"
,
package_version
,
"--file-name"
,
file_name
,
]
ret
=
gitlab_cli
(
cmd
)
assert
ret
.
stdout
==
file_content
Back
|
FazBrowse Home
|
New Git URL