| 1 |
"""Fixtures.""" |
| 2 |
# pylint: disable=missing-docstring |
| 3 |
import pytest |
| 4 |
|
| 5 |
|
| 6 |
@pytest.fixture() |
| 7 |
def contents_list_response(): |
| 8 |
return [ |
| 9 |
{ |
| 10 |
"type": "file", |
| 11 |
"size": 625, |
| 12 |
"name": "octokit.rb", |
| 13 |
"path": "lib/octokit.rb", |
| 14 |
"sha": "fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b", |
| 15 |
"url": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb", |
| 16 |
"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b", |
| 17 |
"html_url": "https://github.com/octokit/octokit.rb/blob/main/lib/octokit.rb", |
| 18 |
"download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/main/lib/octokit.rb", |
| 19 |
"_links": { |
| 20 |
"self": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb", |
| 21 |
"git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b", |
| 22 |
"html": "https://github.com/octokit/octokit.rb/blob/main/lib/octokit.rb", |
| 23 |
}, |
| 24 |
}, |
| 25 |
{ |
| 26 |
"type": "dir", |
| 27 |
"size": 0, |
| 28 |
"name": "octokit", |
| 29 |
"path": "lib/octokit", |
| 30 |
"sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d", |
| 31 |
"url": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit", |
| 32 |
"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d", |
| 33 |
"html_url": "https://github.com/octokit/octokit.rb/tree/main/lib/octokit", |
| 34 |
"download_url": None, |
| 35 |
"_links": { |
| 36 |
"self": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit", |
| 37 |
"git": "https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d", |
| 38 |
"html": "https://github.com/octokit/octokit.rb/tree/main/lib/octokit", |
| 39 |
}, |
| 40 |
}, |
| 41 |
] |
| 42 |
|
| 43 |
|
| 44 |
@pytest.fixture() |
| 45 |
def contents_file_response(): |
| 46 |
return { |
| 47 |
"type": "file", |
| 48 |
"encoding": "base64", |
| 49 |
"size": 5362, |
| 50 |
"name": "README.md", |
| 51 |
"path": "README.md", |
| 52 |
"content": "", |
| 53 |
"sha": "3d21ec53a331a6f037a91c368710b99387d012c1", |
| 54 |
"url": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", |
| 55 |
"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", |
| 56 |
"html_url": "https://github.com/octokit/octokit.rb/blob/main/README.md", |
| 57 |
"download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/main/README.md", |
| 58 |
"_links": { |
| 59 |
"git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", |
| 60 |
"self": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", |
| 61 |
"html": "https://github.com/octokit/octokit.rb/blob/main/README.md", |
| 62 |
}, |
| 63 |
} |