| 1 |
""" |
| 2 |
Generated by generate/generate.py - 2020-08-02 15:48:55.441838 |
| 3 |
""" |
| 4 |
from aiogithubapi.objects.repos.commit import AIOGitHubAPIReposCommit |
| 5 |
|
| 6 |
from tests.legacy.responses.repos.commit_fixtrue import commit_fixtrue_response |
| 7 |
|
| 8 |
|
| 9 |
def test_commit(commit_fixtrue_response): |
| 10 |
obj = AIOGitHubAPIReposCommit(commit_fixtrue_response) |
| 11 |
assert obj.url == commit_fixtrue_response["url"] |
| 12 |
assert obj.sha == commit_fixtrue_response["sha"] |
| 13 |
assert obj.node_id == commit_fixtrue_response["node_id"] |
| 14 |
assert obj.html_url == commit_fixtrue_response["html_url"] |
| 15 |
assert obj.comments_url == commit_fixtrue_response["comments_url"] |
| 16 |
assert obj.commit.url == commit_fixtrue_response["commit"]["url"] |
| 17 |
assert obj.commit.author.name == commit_fixtrue_response["commit"]["author"]["name"] |
| 18 |
assert obj.commit.author.email == commit_fixtrue_response["commit"]["author"]["email"] |
| 19 |
assert obj.commit.author.date == commit_fixtrue_response["commit"]["author"]["date"] |
| 20 |
assert obj.commit.committer.name == commit_fixtrue_response["commit"]["committer"]["name"] |
| 21 |
assert obj.commit.committer.email == commit_fixtrue_response["commit"]["committer"]["email"] |
| 22 |
assert obj.commit.committer.date == commit_fixtrue_response["commit"]["committer"]["date"] |
| 23 |
assert obj.commit.message == commit_fixtrue_response["commit"]["message"] |
| 24 |
assert obj.commit.tree.url == commit_fixtrue_response["commit"]["tree"]["url"] |
| 25 |
assert obj.commit.tree.sha == commit_fixtrue_response["commit"]["tree"]["sha"] |
| 26 |
assert obj.commit.comment_count == commit_fixtrue_response["commit"]["comment_count"] |
| 27 |
assert ( |
| 28 |
obj.commit.verification.verified |
| 29 |
== commit_fixtrue_response["commit"]["verification"]["verified"] |
| 30 |
) |
| 31 |
assert ( |
| 32 |
obj.commit.verification.reason |
| 33 |
== commit_fixtrue_response["commit"]["verification"]["reason"] |
| 34 |
) |
| 35 |
assert ( |
| 36 |
obj.commit.verification.signature |
| 37 |
== commit_fixtrue_response["commit"]["verification"]["signature"] |
| 38 |
) |
| 39 |
assert ( |
| 40 |
obj.commit.verification.payload |
| 41 |
== commit_fixtrue_response["commit"]["verification"]["payload"] |
| 42 |
) |
| 43 |
assert obj.author.login == commit_fixtrue_response["author"]["login"] |
| 44 |
assert obj.author.id == commit_fixtrue_response["author"]["id"] |
| 45 |
assert obj.author.node_id == commit_fixtrue_response["author"]["node_id"] |
| 46 |
assert obj.author.avatar_url == commit_fixtrue_response["author"]["avatar_url"] |
| 47 |
assert obj.author.gravatar_id == commit_fixtrue_response["author"]["gravatar_id"] |
| 48 |
assert obj.author.url == commit_fixtrue_response["author"]["url"] |
| 49 |
assert obj.author.html_url == commit_fixtrue_response["author"]["html_url"] |
| 50 |
assert obj.author.followers_url == commit_fixtrue_response["author"]["followers_url"] |
| 51 |
assert obj.author.following_url == commit_fixtrue_response["author"]["following_url"] |
| 52 |
assert obj.author.gists_url == commit_fixtrue_response["author"]["gists_url"] |
| 53 |
assert obj.author.starred_url == commit_fixtrue_response["author"]["starred_url"] |
| 54 |
assert obj.author.subscriptions_url == commit_fixtrue_response["author"]["subscriptions_url"] |
| 55 |
assert obj.author.organizations_url == commit_fixtrue_response["author"]["organizations_url"] |
| 56 |
assert obj.author.repos_url == commit_fixtrue_response["author"]["repos_url"] |
| 57 |
assert obj.author.events_url == commit_fixtrue_response["author"]["events_url"] |
| 58 |
assert ( |
| 59 |
obj.author.received_events_url == commit_fixtrue_response["author"]["received_events_url"] |
| 60 |
) |
| 61 |
assert obj.author.type == commit_fixtrue_response["author"]["type"] |
| 62 |
assert obj.author.site_admin == commit_fixtrue_response["author"]["site_admin"] |
| 63 |
assert obj.committer.login == commit_fixtrue_response["committer"]["login"] |
| 64 |
assert obj.committer.id == commit_fixtrue_response["committer"]["id"] |
| 65 |
assert obj.committer.node_id == commit_fixtrue_response["committer"]["node_id"] |
| 66 |
assert obj.committer.avatar_url == commit_fixtrue_response["committer"]["avatar_url"] |
| 67 |
assert obj.committer.gravatar_id == commit_fixtrue_response["committer"]["gravatar_id"] |
| 68 |
assert obj.committer.url == commit_fixtrue_response["committer"]["url"] |
| 69 |
assert obj.committer.html_url == commit_fixtrue_response["committer"]["html_url"] |
| 70 |
assert obj.committer.followers_url == commit_fixtrue_response["committer"]["followers_url"] |
| 71 |
assert obj.committer.following_url == commit_fixtrue_response["committer"]["following_url"] |
| 72 |
assert obj.committer.gists_url == commit_fixtrue_response["committer"]["gists_url"] |
| 73 |
assert obj.committer.starred_url == commit_fixtrue_response["committer"]["starred_url"] |
| 74 |
assert ( |
| 75 |
obj.committer.subscriptions_url == commit_fixtrue_response["committer"]["subscriptions_url"] |
| 76 |
) |
| 77 |
assert ( |
| 78 |
obj.committer.organizations_url == commit_fixtrue_response["committer"]["organizations_url"] |
| 79 |
) |
| 80 |
assert obj.committer.repos_url == commit_fixtrue_response["committer"]["repos_url"] |
| 81 |
assert obj.committer.events_url == commit_fixtrue_response["committer"]["events_url"] |
| 82 |
assert ( |
| 83 |
obj.committer.received_events_url |
| 84 |
== commit_fixtrue_response["committer"]["received_events_url"] |
| 85 |
) |
| 86 |
assert obj.committer.type == commit_fixtrue_response["committer"]["type"] |
| 87 |
assert obj.committer.site_admin == commit_fixtrue_response["committer"]["site_admin"] |
| 88 |
assert obj.parents[0].url == commit_fixtrue_response["parents"][0]["url"] |
| 89 |
assert obj.parents[0].sha == commit_fixtrue_response["parents"][0]["sha"] |
| 90 |
assert obj.stats.additions == commit_fixtrue_response["stats"]["additions"] |
| 91 |
assert obj.stats.deletions == commit_fixtrue_response["stats"]["deletions"] |
| 92 |
assert obj.stats.total == commit_fixtrue_response["stats"]["total"] |
| 93 |
assert obj.files[0].filename == commit_fixtrue_response["files"][0]["filename"] |
| 94 |
assert obj.files[0].additions == commit_fixtrue_response["files"][0]["additions"] |
| 95 |
assert obj.files[0].deletions == commit_fixtrue_response["files"][0]["deletions"] |
| 96 |
assert obj.files[0].changes == commit_fixtrue_response["files"][0]["changes"] |
| 97 |
assert obj.files[0].status == commit_fixtrue_response["files"][0]["status"] |
| 98 |
assert obj.files[0].raw_url == commit_fixtrue_response["files"][0]["raw_url"] |
| 99 |
assert obj.files[0].blob_url == commit_fixtrue_response["files"][0]["blob_url"] |
| 100 |
assert obj.files[0].patch == commit_fixtrue_response["files"][0]["patch"] |