Fix tests

This commit is contained in:
Joseph Schorr 2015-04-30 15:47:40 -04:00
parent b7317f894b
commit b3675df667

View file

@ -2637,7 +2637,9 @@ class TestBuildTriggers(ApiTestCase):
self.assertEquals({'status': 'success', 'subdir': ['sometoken', 'foo', 'bar', 'meh']}, subdir_json)
# Activate the trigger.
trigger_config = {}
trigger_config = {
'build_source': 'somesource'
}
activate_json = self.postJsonResponse(BuildTriggerActivate,
params=dict(repository=ADMIN_ACCESS_USER + '/simple', trigger_uuid=trigger.uuid),
data={'config': trigger_config})
@ -2675,7 +2677,9 @@ class TestBuildTriggers(ApiTestCase):
assert 'id' in start_json
self.assertEquals("build-name", start_json['display_name'])
self.assertEquals(['bar'], start_json['job_config']['docker_tags'])
self.assertEquals(['bar'], start_json['tags'])
self.assertEquals('subdir', start_json['subdirectory'])
self.assertEquals('somesource', start_json['trigger']['build_source'])
# Verify the metadata was added.
build_obj = database.RepositoryBuild.get(database.RepositoryBuild.uuid == start_json['id'])
@ -2743,7 +2747,7 @@ class TestBuildTriggers(ApiTestCase):
assert 'id' in start_json
self.assertEquals("build-name", start_json['display_name'])
self.assertEquals(['bar'], start_json['job_config']['docker_tags'])
self.assertEquals(['bar'], start_json['tags'])
class TestUserAuthorizations(ApiTestCase):