def setUp(self): super().setUp() set_test_client(self.client) self.owner = login(verified=True) self.article = self.create_article(published=True) self.slug = self.article['slug'] logout()
def setUp(self): super().setUp() login(verified=True) self.reported1 = self.generate_article(published=True) self.reported2 = self.generate_article(published=True) login() self.report(self.reported1) self.report(self.reported2) login() self.report(self.reported1) self.report(self.reported2) logout()
def test_unauthenticated_users_cannot_report_articles(self): login(verified=True) slug = self.generate_article(published=True) logout() response = self.report(slug) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def setUp(self): super().setUp() logout()
def setUp(self): super().setUp() set_test_client(self.client) logout()
def setUp(self): super().setUp() set_test_client(self.client) self.slug = self.generate_article() logout()