def setUpClass(cls): """ Project1: user1, user2, user3 Project2: user1, user2 Project3: user1, user3 """ super(SearchTestMixin, cls).setUpClass() cls.user1 = snippets.create_user() cls.user2 = snippets.create_user() cls.user3 = snippets.create_user() cls.project1 = snippets.create_project(cls.user1) cls.project2 = snippets.create_project(cls.user1) cls.project3 = snippets.create_project(cls.user1) cls.project1.add_user(cls.user2) cls.project1.add_user(cls.user3) cls.project2.add_user(cls.user2) cls.project3.add_user(cls.user3) cls.issue1 = Issue.create(cls.user1, "first issue", "whatever dude", cls.project1, assigned=cls.user1) cls.issue2 = Issue.create(cls.user1, "second issue", "lamb on the ground", cls.project1, assigned=cls.user2) cls.issue3 = Issue.create(cls.user1, "friendly hello", "hey there dude", cls.project2, assigned=cls.user1) cls.issue4 = Issue.create(cls.user1, "big problem", "pizza on the ground", cls.project2) search.refresh() # to ensure our stuff is going to be there when we search
def setUp(self, create_user=True, login=True, create_project=True): super(IntegrationTestCase, self).setUp() if create_user: self.user = snippets.create_user() if create_project: self.project = snippets.create_project(self.user) if login: self.login()
def setUp(self): self.user = snippets.create_user() self.project = snippets.create_project(self.user) assert self.project assert isinstance(self.project.wiki, Wiki)