tests: simple test for BuildRequest w/ archive URL

This commit is contained in:
Jimmy Zelinskie 2016-06-02 11:59:16 -04:00
parent 0637091a8b
commit e5241c6d88

View file

@ -455,7 +455,9 @@ class TestConvertToOrganization(ApiTestCase):
self.assertEquals(True, json['is_admin'])
# Verify the now-org has no permissions.
count = (database.RepositoryPermission.select()
count = (database
.RepositoryPermission
.select()
.where(database.RepositoryPermission.user == organization)
.count())
self.assertEquals(0, count)
@ -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)