kopia lustrzana https://github.com/Langenfeld/py-gitea
Fixed a bug in gitea.Gitea.get_accessible_repositories()
The method now uses `self` instead of `self.gitea` to access the connection.pull/5/head
rodzic
f9a2ae6f97
commit
d0fe221e54
|
@ -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