示例#1
0
 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()
示例#2
0
 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()
示例#3
0
 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)
示例#4
0
 def setUp(self):
     super().setUp()
     logout()
示例#5
0
 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()