Example #1
0
 def createSubscribersForTask(self):
     """Creates subscribers for the task.
 """
     for i in range(4):
         email = "*****@*****.**" % str(i)
         subscriber = GCIProfileHelper(self.gci, self.dev_test)
         subscriber.createOtherUser(email)
         subscriber.createProfile()
         self.task.subscribers.append(subscriber.profile.key())
     self.task.put()
Example #2
0
 def createSubscribersForTask(self):
   """Creates subscribers for the task.
   """
   for i in range(4):
     email = '*****@*****.**' % str(i)
     subscriber = GCIProfileHelper(self.gci, self.dev_test)
     subscriber.createOtherUser(email)
     subscriber.createProfile()
     self.task.subscribers.append(subscriber.profile.key())
   self.task.put()
    def testCreateTaskDuringProgramForNoRole(self):
        """Tests the task creation view during the program for user with no role.
    """
        self.timeline.tasksPubliclyVisible()

        profile_helper = GCIProfileHelper(self.gci, self.dev_test)
        profile_helper.createProfile()

        url = '/gci/task/create/' + self.org.key().name()
        response = self.get(url)

        # User has no privileges to create tasks
        self.assertResponseForbidden(response)
Example #4
0
  def testCreateTaskDuringProgramForNoRole(self):
    """Tests the task creation view during the program for user with no role.
    """
    self.timeline.tasksPubliclyVisible()

    profile_helper = GCIProfileHelper(self.gci, self.dev_test)
    profile_helper.createProfile()

    url = '/gci/task/create/' + self.org.key().name()
    response = self.get(url)

    # User has no privileges to create tasks
    self.assertResponseForbidden(response)
    def testCreateTaskBeforeOrgsAnnouncedForNoRole(self):
        """Tests the task creation view before the program is public for user with
    no role.
    """
        self.timeline.orgSignup()

        profile_helper = GCIProfileHelper(self.gci, self.dev_test)
        profile_helper.createProfile()

        url = '/gci/task/create/' + self.org.key().name()
        response = self.get(url)

        # Task creation has not started yet and no role to create tasks
        self.assertResponseForbidden(response)
    def testCreateTaskAfterClaimEndForNoRole(self):
        """Tests the task creation view after the task claim deadline for user with
    no role.
    """
        self.timeline.taskClaimEnded()

        profile_helper = GCIProfileHelper(self.gci, self.dev_test)
        profile_helper.createProfile()

        url = '/gci/task/create/' + self.org.key().name()
        response = self.get(url)

        # Task creation has not started yet and no role to create tasks
        self.assertResponseForbidden(response)
Example #7
0
  def testCreateTaskBeforeOrgsAnnouncedForNoRole(self):
    """Tests the task creation view before the program is public for user with
    no role.
    """
    self.timeline.orgSignup()

    profile_helper = GCIProfileHelper(self.gci, self.dev_test)
    profile_helper.createProfile()

    url = '/gci/task/create/' + self.org.key().name()
    response = self.get(url)

    # Task creation has not started yet and no role to create tasks
    self.assertResponseForbidden(response)
Example #8
0
  def testCreateTaskAfterClaimEndForNoRole(self):
    """Tests the task creation view after the task claim deadline for user with
    no role.
    """
    self.timeline.taskClaimEnded()

    profile_helper = GCIProfileHelper(self.gci, self.dev_test)
    profile_helper.createProfile()

    url = '/gci/task/create/' + self.org.key().name()
    response = self.get(url)

    # Task creation has not started yet and no role to create tasks
    self.assertResponseForbidden(response)
    def testPostClaimEditTaskDuringProgramForNoRole(self):
        """Tests the task post claim editing view during the program for user
    with no role.
    """
        self.timeline.tasksPubliclyVisible()

        profile_helper = GCIProfileHelper(self.gci, self.dev_test)
        profile_helper.createProfile()

        task = self.createTask(status='ClaimRequested')

        url = '/gci/task/edit/%s/%s' % (self.gci.key().name(), task.key().id())
        response = self.get(url)

        # User without any role cannot edit the task
        self.assertResponseForbidden(response)
    def testPostClaimEditTaskAfterClaimEndForNoRole(self):
        """Tests the task post claim editing view after the task claim deadline for
    user with no role.
    """
        self.timeline.taskClaimEnded()

        profile_helper = GCIProfileHelper(self.gci, self.dev_test)
        profile_helper.createProfile()

        task = self.createTask(status='NeedsReview')

        url = '/gci/task/edit/%s/%s' % (self.gci.key().name(), task.key().id())
        response = self.get(url)

        # Task post claim editing has not started yet and no role to edit tasks
        self.assertResponseForbidden(response)
    def testPostClaimEditTaskBeforeOrgsAnnouncedForNoRole(self):
        """Tests the task post claim editing view before the program is public
    for user with no role.
    """
        self.timeline.orgSignup()

        profile_helper = GCIProfileHelper(self.gci, self.dev_test)
        profile_helper.createProfile()

        task = self.createTask(status='ClaimRequested')

        url = '/gci/task/edit/%s/%s' % (self.gci.key().name(), task.key().id())
        response = self.get(url)

        # Task post claim editing has not started yet and no role to edit tasks
        self.assertResponseForbidden(response)
Example #12
0
  def testPostClaimEditTaskDuringProgramForNoRole(self):
    """Tests the task post claim editing view during the program for user
    with no role.
    """
    self.timeline.tasksPubliclyVisible()

    profile_helper = GCIProfileHelper(self.gci, self.dev_test)
    profile_helper.createProfile()

    task = self.createTask(status='ClaimRequested')

    url = '/gci/task/edit/%s/%s' % (self.gci.key().name(), task.key().id())
    response = self.get(url)

    # User without any role cannot edit the task
    self.assertResponseForbidden(response)
Example #13
0
  def testPostClaimEditTaskAfterClaimEndForNoRole(self):
    """Tests the task post claim editing view after the task claim deadline for
    user with no role.
    """
    self.timeline.taskClaimEnded()

    profile_helper = GCIProfileHelper(self.gci, self.dev_test)
    profile_helper.createProfile()

    task = self.createTask(status='NeedsReview')

    url = '/gci/task/edit/%s/%s' % (self.gci.key().name(), task.key().id())
    response = self.get(url)

    # Task post claim editing has not started yet and no role to edit tasks
    self.assertResponseForbidden(response)
Example #14
0
  def testPostClaimEditTaskBeforeOrgsAnnouncedForNoRole(self):
    """Tests the task post claim editing view before the program is public
    for user with no role.
    """
    self.timeline.orgSignup()

    profile_helper = GCIProfileHelper(self.gci, self.dev_test)
    profile_helper.createProfile()

    task = self.createTask(status='ClaimRequested')

    url = '/gci/task/edit/%s/%s' % (self.gci.key().name(), task.key().id())
    response = self.get(url)

    # Task post claim editing has not started yet and no role to edit tasks
    self.assertResponseForbidden(response)
Example #15
0
 def _invitee(self):
     invitee_data = GCIProfileHelper(self.gci, self.dev_test)
     invitee_data.createOtherUser("*****@*****.**")
     invitee_data.createProfile()
     invitee_data.notificationSettings(new_invites=True)
     return invitee_data.profile
Example #16
0
 def _invitee(self):
   invitee_data = GCIProfileHelper(self.gci, self.dev_test)
   invitee_data.createOtherUser('*****@*****.**')
   invitee_data.createProfile()
   invitee_data.notificationSettings(new_invites=True)
   return invitee_data.profile