kopia lustrzana https://github.com/Langenfeld/py-gitea
(testing) Test Repository patching
rodzic
7a9866116d
commit
d0c665b3e3
|
@ -127,6 +127,24 @@ def test_create_repo_orgowned(instance):
|
||||||
assert repo.name == test_repo
|
assert repo.name == test_repo
|
||||||
assert not repo.private
|
assert not repo.private
|
||||||
|
|
||||||
|
|
||||||
|
def test_patch_repo(instance):
|
||||||
|
fields = {
|
||||||
|
"allow_rebase": False,
|
||||||
|
"description": "new description",
|
||||||
|
"has_projects": True,
|
||||||
|
"private": True,
|
||||||
|
}
|
||||||
|
org = Organization.request(instance, test_org)
|
||||||
|
repo = org.get_repository(test_repo)
|
||||||
|
for field, value in fields.items():
|
||||||
|
setattr(repo, field, value)
|
||||||
|
repo.commit()
|
||||||
|
repo = org.get_repository(test_repo)
|
||||||
|
for field, value in fields.items():
|
||||||
|
assert getattr(repo, field) == value
|
||||||
|
|
||||||
|
|
||||||
def test_list_branches(instance):
|
def test_list_branches(instance):
|
||||||
org = Organization.request(instance, test_org)
|
org = Organization.request(instance, test_org)
|
||||||
repo = org.get_repository(test_repo)
|
repo = org.get_repository(test_repo)
|
||||||
|
|
Ładowanie…
Reference in New Issue