tests: simple test for BuildRequest w/ archive URL
This commit is contained in:
parent
0637091a8b
commit
e5241c6d88
1 changed files with 19 additions and 8 deletions
|
@ -247,11 +247,11 @@ class TestDiscovery(ApiTestCase):
|
|||
|
||||
|
||||
class TestErrorDescription(ApiTestCase):
|
||||
def test_get_error(self):
|
||||
json = self.getJsonResponse(Error, params=dict(error_type='not_found'))
|
||||
assert json['title'] == 'not_found'
|
||||
assert 'type' in json
|
||||
assert 'description' in json
|
||||
def test_get_error(self):
|
||||
json = self.getJsonResponse(Error, params=dict(error_type='not_found'))
|
||||
assert json['title'] == 'not_found'
|
||||
assert 'type' in json
|
||||
assert 'description' in json
|
||||
|
||||
|
||||
class TestPlans(ApiTestCase):
|
||||
|
@ -455,9 +455,11 @@ class TestConvertToOrganization(ApiTestCase):
|
|||
self.assertEquals(True, json['is_admin'])
|
||||
|
||||
# Verify the now-org has no permissions.
|
||||
count = (database.RepositoryPermission.select()
|
||||
.where(database.RepositoryPermission.user == organization)
|
||||
.count())
|
||||
count = (database
|
||||
.RepositoryPermission
|
||||
.select()
|
||||
.where(database.RepositoryPermission.user == organization)
|
||||
.count())
|
||||
self.assertEquals(0, count)
|
||||
|
||||
def test_convert_via_email(self):
|
||||
|
@ -1814,6 +1816,15 @@ class TestGetRepository(ApiTestCase):
|
|||
|
||||
|
||||
class TestRepositoryBuildResource(ApiTestCase):
|
||||
|
||||
def test_repo_build_invalid_url(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
self.postJsonResponse(RepositoryBuildList,
|
||||
params=dict(repository=ADMIN_ACCESS_USER + '/simple'),
|
||||
data=dict(archive_url='hppt://quay.io'),
|
||||
expected_code=400)
|
||||
|
||||
def test_cancel_invalidbuild(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
|
|
Reference in a new issue