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 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)
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)
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)
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
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