Exemplo n.º 1
0
    def testCreateTaskAfterClaimEndForStudent(self):
        """Tests the task creation view after the task claim deadline for student.
    """
        self.timeline.taskClaimEnded()

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

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

        # Task creation has not started yet
        self.assertResponseForbidden(response)
Exemplo n.º 2
0
    def testCreateTaskDuringProgramForStudent(self):
        """Tests the task creation view during the program for org admin.
    """
        self.timeline.tasksPubliclyVisible()

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

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

        # Student can't create tasks
        self.assertResponseForbidden(response)
Exemplo n.º 3
0
  def testCreateTaskDuringProgramForStudent(self):
    """Tests the task creation view during the program for org admin.
    """
    self.timeline.tasksPubliclyVisible()

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

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

    # Student can't create tasks
    self.assertResponseForbidden(response)
Exemplo n.º 4
0
    def testCreateTaskBeforeOrgsAnnouncedForStudent(self):
        """Tests the task creation view before the program is public for org admin.
    """
        self.timeline.orgSignup()

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

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

        # Task creation has not started yet
        self.assertResponseForbidden(response)
Exemplo n.º 5
0
  def testCreateTaskAfterClaimEndForStudent(self):
    """Tests the task creation view after the task claim deadline for student.
    """
    self.timeline.taskClaimEnded()

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

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

    # Task creation has not started yet
    self.assertResponseForbidden(response)
Exemplo n.º 6
0
  def testCreateTaskBeforeOrgsAnnouncedForStudent(self):
    """Tests the task creation view before the program is public for org admin.
    """
    self.timeline.orgSignup()

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

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

    # Task creation has not started yet
    self.assertResponseForbidden(response)
Exemplo n.º 7
0
    def testPostClaimEditTaskDuringProgramForStudent(self):
        """Tests the task post claim editing view during the program for student.
    """
        self.timeline.tasksPubliclyVisible()

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

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

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

        # Student cannot edit task
        self.assertResponseForbidden(response)
Exemplo n.º 8
0
  def testPostClaimEditTaskDuringProgramForStudent(self):
    """Tests the task post claim editing view during the program for student.
    """
    self.timeline.tasksPubliclyVisible()

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

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

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

    # Student cannot edit task
    self.assertResponseForbidden(response)
Exemplo n.º 9
0
    def testPostClaimEditTaskAfterClaimEndForStudent(self):
        """Tests the task post claim editing view after the task claim deadline
    for student.
    """
        self.timeline.taskClaimEnded()

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

        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
        self.assertResponseForbidden(response)
Exemplo n.º 10
0
    def testPostClaimEditTaskBeforeOrgsAnnouncedForStudent(self):
        """Tests the task post claim editing view before the program is
    public for student.
    """
        self.timeline.orgSignup()

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

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

        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
        self.assertResponseForbidden(response)
Exemplo n.º 11
0
  def testPostClaimEditTaskAfterClaimEndForStudent(self):
    """Tests the task post claim editing view after the task claim deadline
    for student.
    """
    self.timeline.taskClaimEnded()

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

    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
    self.assertResponseForbidden(response)
Exemplo n.º 12
0
  def testPostClaimEditTaskBeforeOrgsAnnouncedForStudent(self):
    """Tests the task post claim editing view before the program is
    public for student.
    """
    self.timeline.orgSignup()

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

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

    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
    self.assertResponseForbidden(response)