Flesh out some of the organization methods and fix the models.

This commit is contained in:
yackob03 2013-11-01 19:34:17 -04:00
parent ecc4ad6e0f
commit 4c0f987af3
5 changed files with 181 additions and 64 deletions

View file

@ -148,6 +148,19 @@ if __name__ == '__main__':
'Empty repository which is building.',
False, [], (0, [], None))
org = model.create_organization('devtableorg', 'quay@devtable.com',
new_user_1)
org_repo = __generate_repository(org, 'orgrepo',
'Repository owned by an org.', False,
[], (4, [], ['latest', 'prod']))
reader_team = model.create_team('Readers', org)
model.set_team_repo_permission(reader_team.name, org_repo.namespace,
org_repo.name, 'read')
model.add_user_to_team(new_user_2, reader_team)
token = model.create_access_token(building, 'write')
tag = 'ci.devtable.com:5000/%s/%s' % (building.namespace, building.name)
build = model.create_repository_build(building, token, '123-45-6789', tag)