コード例 #1
0
    def setUp(self):
        self.member = utils.sample_member()
        self.project = utils.sample_project(creator=self.member)
        self.project.members.add(self.member)

        self.client = Client()
        self.client.force_login(self.member)
        self.create_url = reverse('bugs:create')
コード例 #2
0
    def setUp(self):
        self.creator = utils.sample_member()
        self.project = utils.sample_project()
        self.project.members.add(self.creator)
        self.bug = utils.sample_bug(creator=self.creator, project=self.project)

        self.client = Client()
        self.client.force_login(self.creator)
        self.update_url = reverse('bugs:creator_update', args=[self.bug.id])
コード例 #3
0
    def setUp(self):
        self.supervisor = utils.sample_member(email='*****@*****.**')
        self.project = utils.sample_project()
        self.project.members.add(self.supervisor)
        self.project.supervisors.add(self.supervisor)
        self.bug = utils.sample_bug(creator=self.supervisor,
                                    project=self.project)
        self.bug.set_status(self.bug.WAITING_STATUS)

        self.client = Client()
        self.client.force_login(self.supervisor)

        self.change_working_status_url = reverse('bugs:change_working_status',
                                                 args=[self.bug.id])
コード例 #4
0
    def setUp(self):
        self.member = utils.sample_member(email='*****@*****.**')
        self.supervisor = utils.sample_member(email='*****@*****.**')
        self.project = utils.sample_project()
        self.project.members.add(self.member)
        self.project.members.add(self.supervisor)
        self.project.supervisors.add(self.supervisor)
        self.bug = utils.sample_bug(creator=self.member, project=self.project)

        self.client = Client()
        self.client.force_login(self.supervisor)

        self.assign_member_url = reverse('bugs:assign_member',
                                         args=[self.bug.id])
コード例 #5
0
    def setUp(self):
        self.superuser = utils.sample_superuser()
        self.supervisor = utils.sample_member(email="*****@*****.**")
        self.member = utils.sample_member()
        self.non_member = utils.sample_member(email="*****@*****.**")
        self.project = utils.sample_project(creator=self.supervisor)
        self.project.members.add(self.member)
        self.project.members.add(self.supervisor)
        self.project.supervisors.add(self.supervisor)
        self.bug = utils.sample_bug(creator=self.superuser,
                                    project=self.project)

        self.client = Client()
        self.message_create_url = reverse('bugs:create_message',
                                          args=[self.bug.id])
コード例 #6
0
    def setUp(self):
        self.superuser = utils.sample_superuser(email='*****@*****.**')
        self.supervisor = utils.sample_member(email='*****@*****.**')
        self.creator = utils.sample_member(email='*****@*****.**')
        self.assigned = utils.sample_member(email='*****@*****.**')
        self.member = utils.sample_member(email='*****@*****.**')

        self.project = utils.sample_project(creator=self.supervisor)
        self.project.members.add(self.supervisor)
        self.project.members.add(self.creator)
        self.project.members.add(self.assigned)
        self.project.members.add(self.member)
        self.project.supervisors.add(self.supervisor)

        self.bug = utils.sample_bug(creator=self.creator, project=self.project)
        self.bug.assigned_members.add(self.assigned)

        self.client = Client()
        self.detail_url = reverse('bugs:detail', args=[self.bug.id])
コード例 #7
0
    def setUp(self):
        self.client = Client()

        self.member = utils.sample_member()
        self.creator = utils.sample_member(email="*****@*****.**")
        self.superuser = utils.sample_superuser()
        self.project = utils.sample_project()
        self.project.members.add(self.creator)
        self.bug = utils.sample_bug(creator=self.creator, project=self.project)

        self.list_url = reverse('bugs:list')
        self.detail_url = reverse('bugs:detail', args=[self.bug.id])
        self.create_url = reverse('bugs:create')
        self.update_url = reverse('bugs:update', args=[self.bug.id])
        self.creator_update_url = reverse('bugs:creator_update',
                                          args=[self.bug.id])
        self.assign_member_url = reverse('bugs:assign_member',
                                         args=[self.bug.id])
        self.change_status_url = reverse('bugs:change_status',
                                         args=[self.bug.id])
        self.change_working_status_url = reverse('bugs:change_working_status',
                                                 args=[self.bug.id])

        self.bugPayload = {'title': 'Tmp', 'project': self.project.id}