Make test@example.com a mentor for one gsoc org and an admin (for a different) gsoc org.
authorTim Ansell <mithro@gmail.com>
Sun, 29 Mar 2009 07:43:04 +0000
changeset 2027 199bcab679df
parent 2026 388b65cabfbb
child 2028 df97cade97ac
Make test@example.com a mentor for one gsoc org and an admin (for a different) gsoc org. This was the number one issue which was stopping me from testing a bunch of patches.
app/soc/models/seed_db.py
--- a/app/soc/models/seed_db.py	Sat Mar 28 20:19:50 2009 +0000
+++ b/app/soc/models/seed_db.py	Sun Mar 29 07:43:04 2009 +0000
@@ -288,6 +288,24 @@
     ranker_root_logic.create(student_proposal.DEF_RANKER_NAME, entity,
         student_proposal.DEF_SCORE, 100)
 
+    if i < 2:
+      role_properties.update({
+          'key_name': 'google/gsoc2009/org_%d/test' % i,
+          'link_id': 'test',
+          'scope_path': 'google/gsoc2009/org_%d' % i,
+          'scope': entity,
+          'program': gsoc2009,
+          })
+ 
+      # Admin for the first org 
+      if i == 0:
+        org_1_admin = OrgAdmin(**role_properties)
+        org_1_admin.put()
+
+      # Only a mentor for the second org
+      if i == 1:
+        org_1_mentor = Mentor(**role_properties)
+        org_1_mentor.put()
 
   role_properties.update({
       'key_name': 'google/ghop2009/melange/test',