Merge remote-tracking branch 'origin/allyourbaseimage'
Conflicts: test/data/test.db test/test_api_usage.py
This commit is contained in:
commit
f4642be11a
126 changed files with 647 additions and 207332 deletions
|
@ -661,7 +661,7 @@ class TestCreateRepo(ApiTestCase):
|
|||
class TestFindRepos(ApiTestCase):
|
||||
def test_findrepos_asguest(self):
|
||||
json = self.getJsonResponse('api.find_repos', params=dict(query='p'))
|
||||
assert len(json['repositories']) == 1
|
||||
self.assertEquals(len(json['repositories']), 1)
|
||||
|
||||
self.assertEquals(json['repositories'][0]['namespace'], 'public')
|
||||
self.assertEquals(json['repositories'][0]['name'], 'publicrepo')
|
||||
|
@ -670,7 +670,7 @@ class TestFindRepos(ApiTestCase):
|
|||
self.login(NO_ACCESS_USER)
|
||||
|
||||
json = self.getJsonResponse('api.find_repos', params=dict(query='p'))
|
||||
assert len(json['repositories']) == 1
|
||||
self.assertEquals(len(json['repositories']), 1)
|
||||
|
||||
self.assertEquals(json['repositories'][0]['namespace'], 'public')
|
||||
self.assertEquals(json['repositories'][0]['name'], 'publicrepo')
|
||||
|
@ -679,20 +679,20 @@ class TestFindRepos(ApiTestCase):
|
|||
self.login(READ_ACCESS_USER)
|
||||
|
||||
json = self.getJsonResponse('api.find_repos', params=dict(query='p'))
|
||||
assert len(json['repositories']) > 1
|
||||
self.assertGreater(len(json['repositories']), 1)
|
||||
|
||||
|
||||
class TestListRepos(ApiTestCase):
|
||||
def test_listrepos_asguest(self):
|
||||
json = self.getJsonResponse('api.list_repos', params=dict(public='true'))
|
||||
assert len(json['repositories']) > 1
|
||||
def test_listrepos_asguest(self):
|
||||
json = self.getJsonResponse('api.list_repos', params=dict(public=True))
|
||||
self.assertEquals(len(json['repositories']), 1)
|
||||
|
||||
def test_listrepos_orgmember(self):
|
||||
def test_listrepos_orgmember(self):
|
||||
self.login(READ_ACCESS_USER)
|
||||
json = self.getJsonResponse('api.list_repos', params=dict(public='true'))
|
||||
assert len(json['repositories']) > 1
|
||||
json = self.getJsonResponse('api.list_repos', params=dict(public=True))
|
||||
self.assertGreater(len(json['repositories']), 1)
|
||||
|
||||
def test_listrepos_filter(self):
|
||||
def test_listrepos_filter(self):
|
||||
self.login(READ_ACCESS_USER)
|
||||
json = self.getJsonResponse('api.list_repos',
|
||||
params=dict(namespace=ORGANIZATION,
|
||||
|
@ -701,11 +701,11 @@ class TestListRepos(ApiTestCase):
|
|||
for repo in json['repositories']:
|
||||
self.assertEquals(ORGANIZATION, repo['namespace'])
|
||||
|
||||
def test_listrepos_limit(self):
|
||||
def test_listrepos_limit(self):
|
||||
self.login(READ_ACCESS_USER)
|
||||
json = self.getJsonResponse('api.list_repos', params=dict(limit=2))
|
||||
|
||||
assert len(json['repositories']) == 2
|
||||
self.assertEquals(len(json['repositories']), 2)
|
||||
|
||||
|
||||
class TestUpdateRepo(ApiTestCase):
|
||||
|
|
Reference in a new issue