File: test_cli_files.py

package info (click to toggle)
python-gitlab 1%3A8.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,884 kB
  • sloc: python: 25,823; makefile: 171; ruby: 27; javascript: 3
file content (21 lines) | stat: -rw-r--r-- 576 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
def test_project_file_raw(gitlab_cli, project, project_file):
    cmd = ["project-file", "raw", "--project-id", project.id, "--file-path", "README"]
    ret = gitlab_cli(cmd)
    assert ret.success
    assert "Initial content" in ret.stdout


def test_project_file_raw_ref(gitlab_cli, project, project_file):
    cmd = [
        "project-file",
        "raw",
        "--project-id",
        project.id,
        "--file-path",
        "README",
        "--ref",
        "main",
    ]
    ret = gitlab_cli(cmd)
    assert ret.success
    assert "Initial content" in ret.stdout