From 955bebbe4283c2939bd266f613786b4405a10eca Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: May 22 2015 08:49:22 +0000 Subject: Add method to link one token with the ACLs of the database for the tests --- diff --git a/tests/__init__.py b/tests/__init__.py index 948702c..944d0fe 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -268,6 +268,18 @@ def create_acls(session): session.commit() +def create_tokens_acl(session): + """ Create some acls for the tokens. """ + for aclid in range(3): + item = pagure.lib.model.TokenAcl( + token_id='aaabbbcccddd', + acl_id=aclid, + ) + session.add(item) + + session.commit() + + def add_content_git_repo(folder): """ Create some content for the specified git repo. """ if not os.path.exists(folder):