changes to reflect PR comments (not finished)
This commit is contained in:
parent
758158391c
commit
fb0d3d69c2
8 changed files with 32 additions and 172 deletions
|
@ -224,6 +224,7 @@ class TestLoggedInUser(ApiTestCase):
|
|||
assert json['anonymous'] == False
|
||||
assert json['username'] == READ_ACCESS_USER
|
||||
|
||||
|
||||
class TestUserStarredRepositoryList(ApiTestCase):
|
||||
def test_get_stars_guest(self):
|
||||
self.getJsonResponse(StarredRepositoryList, expected_code=401)
|
||||
|
@ -240,9 +241,6 @@ class TestUserStarredRepositoryList(ApiTestCase):
|
|||
},
|
||||
expected_code=401)
|
||||
|
||||
def test_unstar_repo_guest(self):
|
||||
self.deleteResponse(StarredRepository, params=dict(repository='public/publicrepo'), expected_code=401)
|
||||
|
||||
def test_star_and_unstar_repo_user(self):
|
||||
self.login(READ_ACCESS_USER)
|
||||
json = self.getJsonResponse(StarredRepositoryList)
|
||||
|
@ -257,8 +255,11 @@ class TestUserStarredRepositoryList(ApiTestCase):
|
|||
assert json['namespace'] == 'public'
|
||||
assert json['repository'] == 'publicrepo'
|
||||
|
||||
self.deleteResponse(StarredRepository, params=dict(repository='public/publicrepo'), expected_code=204)
|
||||
self.deleteResponse(StarredRepository, params=dict(repository='public/publicrepo'),
|
||||
expected_code=204)
|
||||
|
||||
json = self.getJsonResponse(StarredRepositoryList)
|
||||
assert json['repositories'] == []
|
||||
|
||||
|
||||
class TestUserNotification(ApiTestCase):
|
||||
|
|
Reference in a new issue