def setUp(self):

        self.user = UserFactory(username="******",
                                first_name="Bart",
                                last_name="Simpson")
        # self.user2 = UserFactory(is_staff=True)

        self.user2 = UserFactory(
            username="******",
            first_name="Barney",
            last_name="Gumble",
            password="******",
            is_staff=True,
        )

        self.user3 = UserFactory(username="******",
                                 first_name="Homer",
                                 last_name="Simpson")

        adminGrp, created = Group.objects.get_or_create(name="admin")
        self.user2.groups.add(adminGrp)

        self.status = "new"
        self.ticket_type = "bug"
        self.description = "There is something wrong."
        self.priority = 3

        self.ticket = TicketFactory(
            submitted_by=self.user,
            status=self.status,
            ticket_type=self.ticket_type,
            description=self.description,
            priority=self.priority,
        )
    def setUp(self):
        """we will need some users, a ticket, and some private and
        public comments.
        """

        self.user1 = UserFactory(username="******")
        self.user2 = UserFactory(username="******")
        self.user3 = UserFactory(username="******")

        # make user 2 an administrator
        adminGrp, created = Group.objects.get_or_create(name="admin")
        self.user2.groups.add(adminGrp)

        self.ticket = TicketFactory(submitted_by=self.user1)

        self.msg1 = "This is a public message posted by George"
        self.comment1 = FollowUpFactory(
            ticket=self.ticket, submitted_by=self.user1, comment=self.msg1
        )

        self.msg2 = "This is a public message posted by Homer"
        self.comment2 = FollowUpFactory(
            ticket=self.ticket, submitted_by=self.user2, comment=self.msg2
        )

        self.msg3 = "This is a PRIVATE message posted by George"
        self.comment3 = FollowUpFactory(
            ticket=self.ticket, submitted_by=self.user1, comment=self.msg3, private=True
        )

        self.msg4 = "This is a PRIVATE message posted by Homer"
        self.comment4 = FollowUpFactory(
            ticket=self.ticket, submitted_by=self.user2, comment=self.msg4, private=True
        )
    def setUp(self):

        self.user = UserFactory()
        self.user2 = UserFactory(is_staff=True)
        self.user3 = UserFactory(username="******", is_staff=True)

        adminGrp, created = Group.objects.get_or_create(name="admin")
        self.user2.groups.add(adminGrp)

        self.ticket = TicketFactory(submitted_by=self.user)
    def setUp(self):

        self.user = UserFactory()
        self.user2 = UserFactory(is_staff=True)
        self.user3 = UserFactory(username="******")

        adminGrp, created = Group.objects.get_or_create(name="admin")
        self.user2.groups.add(adminGrp)

        self.ticket = TicketFactory()
        self.ticket2 = TicketFactory(description="This is a duplicate")
    def setUp(self):

        self.user = UserFactory(username="******",
                                first_name="Bart",
                                last_name="Simpson")

        self.user2 = UserFactory(username="******",
                                 first_name="Barney",
                                 last_name="Gumble",
                                 is_staff=True)

        adminGrp, created = Group.objects.get_or_create(name="admin")
        self.user2.groups.add(adminGrp)

        self.ticket = TicketFactory()
    def setUp(self):
        """ """
        """create a user, some languages and three snippets"""
        self.user1 = UserFactory(username="******")

        self.ticket1 = TicketFactory(submitted_by=self.user1)
        self.ticket2 = TicketFactory(submitted_by=self.user1)
        self.ticket3 = TicketFactory(submitted_by=self.user1)
Beispiel #7
0
    def setUp(self):

        self.user1 = UserFactory(first_name="Homer", last_name="Simpson")

        desc = "This ticket is new. findme."
        self.ticket1 = TicketFactory(
            status="new",
            submitted_by=self.user1,
            ticket_type="feature",
            title=desc,
            description=desc,
        )

        desc = "This ticket is accepted."
        self.ticket2 = TicketFactory(status="accepted",
                                     submitted_by=self.user1,
                                     title=desc,
                                     description=desc)

        desc = "This ticket is assigned."
        self.ticket3 = TicketFactory(
            status="assigned",
            ticket_type="feature",
            title=desc,
            description=desc,
            assigned_to=self.user1,
        )

        desc = "This ticket is reopened. findme."
        self.ticket4 = TicketFactory(status="reopened",
                                     title=desc,
                                     description=desc)

        desc = "This ticket is closed. findme"
        self.ticket5 = TicketFactory(status="closed",
                                     title=desc,
                                     description=desc)

        desc = "This ticket is a duplicate."
        self.ticket6 = TicketFactory(status="duplicate",
                                     title=desc,
                                     description=desc)

        desc = "This ticket is split."
        self.ticket7 = TicketFactory(status="split",
                                     title=desc,
                                     description=desc)

        # TODO - activate for inactive:
        desc = "This ticket is inactive. findme"
        self.ticket8 = TicketFactory(active=False,
                                     title=desc,
                                     description=desc)
Beispiel #8
0
    def setUp(self):

        self.user = UserFactory()
        desc = "This is the first ticket"
        self.ticket = TicketFactory(submitted_by=self.user, description=desc)

        desc = "This is a duplicate of ticket1"
        self.ticket2 = TicketFactory(description=desc)

        desc = "This will be the 1st child of ticket1"
        self.ticket3 = TicketFactory(submitted_by=self.user,
                                     description=desc,
                                     parent=self.ticket)

        # flag ticket 2 as a duplicate of the first
        self.ticket2.duplicate_of(self.ticket.id)
Beispiel #9
0
    def setUp(self):

        self.user = UserFactory(username="******", password="******")
        self.ticket = TicketFactory()