Merge branch 'dev' into feature-nested-tags2

This commit is contained in:
shamoon
2025-09-12 16:44:53 -07:00
committed by GitHub
4 changed files with 52 additions and 51 deletions

View File

@@ -17,7 +17,7 @@
<i-bs width="0.9em" height="0.9em" name="exclamation-triangle"></i-bs>
}
<div>
<p class="ms-2 mb-0">{{toast.content}}</p>
<p class="ms-2 mb-0 text-break">{{toast.content}}</p>
@if (toast.error) {
<details class="ms-2">
<div class="mt-2 ms-n4 me-n2 small">

View File

@@ -18,14 +18,17 @@ class TestDocument(TestCase):
self.originals_dir = tempfile.mkdtemp()
self.thumb_dir = tempfile.mkdtemp()
override_settings(
self.overrides = override_settings(
ORIGINALS_DIR=self.originals_dir,
THUMBNAIL_DIR=self.thumb_dir,
).enable()
)
self.overrides.enable()
def tearDown(self) -> None:
shutil.rmtree(self.originals_dir)
shutil.rmtree(self.thumb_dir)
self.overrides.disable()
def test_file_deletion(self):
document = Document.objects.create(

View File

@@ -97,12 +97,6 @@ class TestArchiver(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
class TestDecryptDocuments(FileSystemAssertsMixin, TestCase):
@override_settings(
ORIGINALS_DIR=(Path(__file__).parent / "samples" / "originals"),
THUMBNAIL_DIR=(Path(__file__).parent / "samples" / "thumb"),
PASSPHRASE="test",
FILENAME_FORMAT=None,
)
@mock.patch("documents.management.commands.decrypt_documents.input")
def test_decrypt(self, m):
media_dir = tempfile.mkdtemp()
@@ -111,12 +105,12 @@ class TestDecryptDocuments(FileSystemAssertsMixin, TestCase):
originals_dir.mkdir(parents=True, exist_ok=True)
thumb_dir.mkdir(parents=True, exist_ok=True)
override_settings(
with override_settings(
ORIGINALS_DIR=originals_dir,
THUMBNAIL_DIR=thumb_dir,
PASSPHRASE="test",
).enable()
FILENAME_FORMAT=None,
):
doc = Document.objects.create(
checksum="82186aaa94f0b98697d704b90fd1c072",
title="wow",

View File

@@ -3410,8 +3410,8 @@ class TestDateWorkflowLocalization(
w.actions.add(action)
w.save()
settings.SCRATCH_DIR = tmp_path / "scratch"
(tmp_path / "scratch").mkdir(parents=True, exist_ok=True)
(tmp_path / "thumbnails").mkdir(parents=True, exist_ok=True)
# Temporarily override "now" for the environment so templates using
# added/created placeholders behave as if it's a different system date.
@@ -3424,6 +3424,10 @@ class TestDateWorkflowLocalization(
"django.utils.timezone.now",
return_value=self.TEST_DATETIME,
),
override_settings(
SCRATCH_DIR=tmp_path / "scratch",
THUMBNAIL_DIR=tmp_path / "thumbnails",
),
):
tasks.consume_file(
ConsumableDocument(