示例#1
0
    def setUp(self):
        self.user1 = create_user(1)
        self.user2 = create_user(2)
        self.user3 = create_user(3)
        self.user4 = create_user(4)
        self.user5 = create_user(5)

        self.user1.notify_level = "only_assigned"
        self.user1.save()
        self.user2.notify_level = "only_assigned"
        self.user2.save()
        self.user3.notify_level = "only_assigned"
        self.user3.save()
        self.user4.notify_level = "only_assigned"
        self.user4.save()
        self.user5.notify_level = "only_assigned"
        self.user5.save()

        self.project1 = create_project(1, self.user1)

        add_membership(self.project1, self.user1, "back")
        add_membership(self.project1, self.user2, "back")
        add_membership(self.project1, self.user3, "back")
        add_membership(self.project1, self.user4, "back")
        add_membership(self.project1, self.user5, "back")
示例#2
0
    def setUp(self):
        self.user1 = create_user(1, is_superuser=True)
        self.user2 = create_user(2)
        self.user3 = create_user(3)

        self.project1 = create_project(1, self.user1)
        self.project2 = create_project(2, self.user1)
        self.project3 = create_project(3, self.user2)

        add_membership(self.project1, self.user3, "back")
        add_membership(self.project3, self.user3, "back")
        add_membership(self.project3, self.user2, "back")
示例#3
0
    def setUp(self):
        self.user1 = create_user(1)
        self.user2 = create_user(2)
        self.user3 = create_user(3)
        self.user4 = create_user(4)

        self.project1 = create_project(1, self.user1)
        add_membership(self.project1, self.user2)
        add_membership(self.project1, self.user3)

        self.project2 = create_project(2, self.user4)

        self.milestone1 = create_milestone(1, self.user2, self.project1)
        self.milestone2 = create_milestone(2, self.user2, self.project1)
示例#4
0
    def setUp(self):
        self.user1 = create_user(1)
        self.user2 = create_user(2)
        self.user3 = create_user(3)
        self.user4 = create_user(4)

        self.project1 = create_project(1, self.user1)
        add_membership(self.project1, self.user2)
        add_membership(self.project1, self.user3)

        self.project2 = create_project(2, self.user4)

        self.wiki_page1 = create_wiki_page(1, self.user2, self.project1)
        self.wiki_page2 = create_wiki_page(2, self.user2, self.project1)
示例#5
0
    def test_emit_change_for_model(self):
        user = create_user(1) # Project owner
        project = create_project(1, user)
        issue = create_issue(1, user, project)

        with patch("taiga.events.backends.get_events_backend") as mock_instance:
            ch.emit_change_event_for_model(issue, "sessionid")
            self.assertTrue(mock_instance.return_value.emit_event.called)
示例#6
0
    def setUp(self):
        self.user1 = create_user(1) # Project owner
        self.user2 = create_user(2) # Owner
        self.user3 = create_user(3) # Membership
        self.user4 = create_user(4) # No Membership

        self.project1 = create_project(1, self.user1)
        add_membership(self.project1, self.user2)
        add_membership(self.project1, self.user3)
        self.milestone1 = create_milestone(1, self.user2, self.project1)
        self.issue1 = create_issue(1, self.user2, self.project1, self.milestone1)
        self.issue2 = create_issue(2, self.user2, self.project1, self.milestone1)
        self.issue3 = create_issue(3, self.user2, self.project1)

        self.project2 = create_project(2, self.user4)
        self.milestone2 = create_milestone(2, self.user4, self.project2)
        self.issue4 = create_issue(4, self.user4, self.project2)
示例#7
0
    def setUp(self):
        self.user1 = create_user(1)
        self.user2 = create_user(2)
        self.user3 = create_user(3)
        self.user3 = create_user(4)

        self.project1 = create_project(1, self.user1)
        self.project2 = create_project(2, self.user1)
        self.project3 = create_project(3, self.user2)
        self.project4 = create_project(4, self.user2)

        add_membership(self.project1, self.user3, "back")
        add_membership(self.project3, self.user3, "back")

        self.dev_role1 = get_model("users", "Role").objects.get(slug="back", project=self.project1)
        self.dev_role2 = get_model("users", "Role").objects.get(slug="back", project=self.project2)
        self.dev_role3 = get_model("users", "Role").objects.get(slug="back", project=self.project3)
        self.dev_role4 = get_model("users", "Role").objects.get(slug="back", project=self.project4)
示例#8
0
    def setUp(self):
        self.user1 = create_user(1) # Project owner
        self.user2 = create_user(2) # Owner
        self.user3 = create_user(3) # Membership
        self.user4 = create_user(4) # No Membership

        self.project1 = create_project(1, self.user1)
        add_membership(self.project1, self.user2)
        add_membership(self.project1, self.user3)
        self.milestone1 = create_milestone(1, self.user2, self.project1)
        self.userstory1 = create_userstory(1, self.user2, self.project1, self.milestone1)
        self.userstory2 = create_userstory(2, self.user2, self.project1, self.milestone1)
        self.userstory3 = create_userstory(3, self.user2, self.project1)
        self.task1 = create_task(1, self.user2, self.project1, None, self.userstory1)
        self.task2 = create_task(2, self.user3, self.project1, None, self.userstory1)
        self.task3 = create_task(3, self.user2, self.project1, None, self.userstory2)
        self.task4 = create_task(4, self.user3, self.project1, self.milestone1)

        self.project2 = create_project(2, self.user4)
        self.milestone2 = create_milestone(2, self.user4, self.project2)
        self.userstory4 = create_userstory(4, self.user4, self.project2)
        self.task5 = create_task(5, self.user4, self.project2, self.milestone2)
示例#9
0
 def setUp(self):
     self.user1 = create_user(1) # Project owner
     self.project1 = create_project(1, self.user1)
示例#10
0
 def setUp(self):
     self.user1 = create_user(1)
     self.domain1 = create_domain("localhost1", True)
     self.domain2 = create_domain("localhost2", False)
     self.role = self._create_role()
     self.project = create_project(1, self.user1)
示例#11
0
 def setUp(self):
     self.user1 = create_user(1)