kopia lustrzana https://github.com/Langenfeld/py-gitea
commit
3816745354
|
@ -1,3 +1,6 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
.*.sw*
|
.*.sw*
|
||||||
*.token
|
*.token
|
||||||
|
|
||||||
|
# local virtual environment
|
||||||
|
.venv
|
||||||
|
|
|
@ -464,8 +464,8 @@ class Issue(GiteaApiObject):
|
||||||
GET_COMMENTS = """/repos/%s/%s/issues/comments"""
|
GET_COMMENTS = """/repos/%s/%s/issues/comments"""
|
||||||
CREATE_ISSUE = """/repos/{owner}/{repo}/issues"""
|
CREATE_ISSUE = """/repos/{owner}/{repo}/issues"""
|
||||||
|
|
||||||
OPENED = "closed"
|
OPENED = "open"
|
||||||
CLOSED = "open"
|
CLOSED = "closed"
|
||||||
|
|
||||||
def __init__(self, gitea, id: int):
|
def __init__(self, gitea, id: int):
|
||||||
super(Issue, self).__init__(gitea, id=id)
|
super(Issue, self).__init__(gitea, id=id)
|
||||||
|
@ -801,8 +801,8 @@ class Gitea:
|
||||||
|
|
||||||
def get_accessible_repositories(self) -> List[GiteaApiObject]:
|
def get_accessible_repositories(self) -> List[GiteaApiObject]:
|
||||||
""" Get all Repositories accessible by the logged in User."""
|
""" Get all Repositories accessible by the logged in User."""
|
||||||
results = self.gitea.requests_get("/user/repos")
|
results = self.requests_get("/user/repos")
|
||||||
return [Repository.parse_response(self.gitea, result) for result in results]
|
return [Repository.parse_response(self, result) for result in results]
|
||||||
|
|
||||||
def get_users_following(self, username):
|
def get_users_following(self, username):
|
||||||
path = "/users/" + username + "/following"
|
path = "/users/" + username + "/following"
|
||||||
|
|
|
@ -200,3 +200,8 @@ def test_delete_user(instance):
|
||||||
user.delete()
|
user.delete()
|
||||||
with pytest.raises(NotFoundException) as e:
|
with pytest.raises(NotFoundException) as e:
|
||||||
User.request(instance, test_user)
|
User.request(instance, test_user)
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_accessible_repositories(instance):
|
||||||
|
repos = instance.get_accessible_repositories()
|
||||||
|
assert repos == []
|
||||||
|
|
Ładowanie…
Reference in New Issue