def setUp(self): initialise_article_text() self.article_by_paul = Article.objects.get(pk=1) self.article_by_dom = Article.objects.get(pk=2) self.article_by_dom_issue_2 = Article.objects.get(pk=3) self.article_by_dom_unpublished = Article.objects.get(pk=4) self.article_by_dom_and_paul = Article.objects.get(pk=5) self.issue_1 = Issue.objects.get(pk=1) self.issue_2 = Issue.objects.get(pk=2) self.issue_3_unpublished = Issue.objects.get(pk=3) self.paul = Author.objects.get(pk=1) self.dominic = Author.objects.get(pk=2) self.bugs = Author.objects.get(pk=3) if not hasattr(self, 'staff_user'): self.staff_user = User.objects.create_user('staff', '*****@*****.**', 'password') self.staff_user.is_staff = True self.staff_user.save() if not hasattr(self, 'user'): self.user = User.objects.create_user('nonstaff', '*****@*****.**', 'password')
def setUp(self): initialise_article_text() self.article_1 = Article.objects.get(pk = 1) self.article_2 = Article.objects.get(pk = 2) self.article_3 = Article.objects.get(pk = 3) self.author_1 = Author.objects.get(pk = 1) self.author_2 = Author.objects.get(pk = 2) self.author_3 = Author.objects.get(pk = 3)
def setUp(self): initialise_article_text() self.article_by_paul = Article.objects.get(pk=1) self.article_by_dom_and_paul = Article.objects.get(pk=5)