|
@@ -3,6 +3,7 @@ import os
|
|
|
from django.core.files import File
|
|
|
|
|
|
from misago.threads.models import Attachment, AttachmentType
|
|
|
+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,
|
|
|
user_has_data_download_request
|
|
@@ -184,6 +185,12 @@ class PrepareUserDataDownload(AuthenticatedUserTestCase):
|
|
|
|
|
|
self.assert_download_is_valid()
|
|
|
|
|
|
+ def test_prepare_download_with_audit_trail(self):
|
|
|
+ """function creates data download for user with audit trail"""
|
|
|
+ create_user_audit_trail(self.user, '127.0.0.1', self.user)
|
|
|
+
|
|
|
+ self.assert_download_is_valid()
|
|
|
+
|
|
|
|
|
|
class RequestUserDataDownloadTests(AuthenticatedUserTestCase):
|
|
|
def test_util_creates_data_download_for_user_with_them_as_requester(self):
|