Browse Source

Test data download with poll

Rafał Pitoń 6 years ago
parent
commit
ee06f6ef81
1 changed files with 9 additions and 1 deletions
  1. 9 1
      misago/users/tests/test_datadownloads.py

+ 9 - 1
misago/users/tests/test_datadownloads.py

@@ -4,7 +4,7 @@ from django.core.files import File
 
 from misago.categories.models import Category
 from misago.threads.models import Attachment, AttachmentType
-from misago.threads.testutils import post_thread
+from misago.threads.testutils import post_thread, post_poll
 from misago.users.audittrail import create_user_audit_trail
 from misago.users.datadownloads import (
     expire_user_data_download, prepare_user_data_download, request_user_data_download,
@@ -256,6 +256,14 @@ class PrepareUserDataDownload(AuthenticatedUserTestCase):
 
         self.assert_download_is_valid()
 
+    def test_prepare_download_with_poll(self):
+        """function creates data download for user with poll"""
+        category = Category.objects.get(slug='first-category')
+        thread = post_thread(category, poster=self.user)
+        post_poll(thread, self.user)
+
+        self.assert_download_is_valid()
+
 
 class RequestUserDataDownloadTests(AuthenticatedUserTestCase):
     def test_util_creates_data_download_for_user_with_them_as_requester(self):