Only send heavy log-based stats for repository where required
This commit is contained in:
parent
338f93c3c8
commit
c3701cea7a
3 changed files with 37 additions and 19 deletions
|
@ -1513,7 +1513,12 @@ class TestListRepos(ApiTestCase):
|
|||
|
||||
class TestViewPublicRepository(ApiTestCase):
|
||||
def test_normalview(self):
|
||||
self.getJsonResponse(Repository, params=dict(repository='public/publicrepo'))
|
||||
resp = self.getJsonResponse(Repository, params=dict(repository='public/publicrepo'))
|
||||
self.assertFalse('stats' in resp)
|
||||
|
||||
def test_normalview_withstats(self):
|
||||
resp = self.getJsonResponse(Repository, params=dict(repository='public/publicrepo', includeStats=True))
|
||||
self.assertTrue('stats' in resp)
|
||||
|
||||
def test_anon_access_disabled(self):
|
||||
import features
|
||||
|
|
Reference in a new issue