Пример #1
0
 def setUpTestData(cls):
     super().setUpTestData()
     cls.user = UserFactory()
     cls.staff_user = AdminUserFactory()
     cls.create_content_set()
     cls.other_profile = ProfileFactory()
     cls.reply = PublicContentFactory(parent=cls.public_content)
Пример #2
0
 def setUpTestData(cls):
     super().setUpTestData()
     cls.site = AdminSite()
     cls.user = AdminUserFactory()
     cls.request = cls.get_request(cls.user)
     if PolicyDocument.objects.count() == 0:
         # Pytest ignores data migrations for some reason..
         # Possibly related? https://github.com/pytest-dev/pytest-django/issues/341
         PolicyDocument.objects.create(
             type=PolicyDocumentType.TERMS_OF_SERVICE,
             content='foo',
             state='draft',
         )
         PolicyDocument.objects.create(
             type=PolicyDocumentType.PRIVACY_POLICY,
             content='foo',
             state='draft',
         )
     cls.document = PolicyDocument.objects.first()
     cls.admin = PolicyDocumentAdmin(PolicyDocument, cls.site)
Пример #3
0
 def setUpTestData(cls):
     super().setUpTestData()
     cls.admin_user = AdminUserFactory()
     cls.user = PublicUserFactory()
     cls.profile = PublicProfileFactory()
Пример #4
0
 def setUpTestData(cls):
     super().setUpTestData()
     cls.user = UserFactory()
     cls.admin_user = AdminUserFactory()