Commit Graph
9 Commits
Author SHA1 Message Date
stumpylog e9b56abfe9 Chore: Move unittest directory setup onto the shared fixture
The unittest side of the suite built its temp directory tree with
tempfile.mkdtemp and a manually enabled override_settings, cleaned up only if
tearDown ran. That is now gone. DirectoriesMixin lives alongside the layout it
bridges and does nothing but hand the paperless_dirs fixture to TestCase
subclasses as self.dirs, so both halves of the suite get the same twelve
settings, the same directory shapes and cleanup owned by tmp_path.

The mixin moves to paperless_testing.dirs rather than staying in the documents
test utilities, because modules in paperless and paperless_mail import it
across the app boundary. The thirty-eight consuming modules change only their
import line; self.dirs.scratch_dir and its siblings keep working.
2026-09-21 08:08:49 -07:00
Trenton H 1f8b6c95b1 Feature: parse advanced search with whoosh-compat and delete the handwritten translation (#14072)
* Feature: parse advanced search with whoosh-compat and delete the hand-written translator

* Don't cover these, they exist for defensive, but there's no other current diagnostic

* A mix of more no cover and tests

* Route SCHEMA_FIELD_MISSING into an error, not an HTTP 400
2026-09-15 07:26:41 -07:00
shamoon 4421d4fe58 Fix: update some api global perms inconsistencies (#14086) 2026-09-12 16:17:48 -07:00
Trenton H a2dbe17a78 Fix: Use FileResponse for file API responses (#12638)
* Updates code to use a FileResponse for streaming and unlink the file, but keep a handle to it

* Transitions the rest of the code to use FileResponse instead of a basic response, fixes up tests which assumed .content exists

* While here, let's add schema for it
2026-04-25 06:40:09 -07:00
Sebastian Steinbeißer 3b5ffbf9fa Chore(mypy): Annotate None returns for typing improvements (#11213) 2026-02-02 08:44:12 -08:00
Sebastian Steinbeißer fce7b03324 Chore: Switch from os.path to pathlib.Path (#8644) 2025-01-29 10:58:53 -08:00
shamoon 485237caf1 Fix: check permissions for all documents via bulk download (#8631) 2025-01-07 00:10:11 -08:00
Trenton H 4813a7bc70 Chore: Adds additional rules for Ruff linter (#5660) 2024-02-05 21:46:59 +00:00
shamoonandTrenton H e2d25a7a09 Chore: reorganize api tests (#4935)
* Move permissions-related API tests

* Move bulk-edit-related API tests

* Move bulk-download-related API tests

* Move uisettings-related API tests

* Move remoteversion-related API tests

* Move tasks API tests

* Move object-related API tests

* Move consumption-template-related API tests

* Rename pared-down documents API test file

Co-Authored-By: Trenton H <797416+stumpylog@users.noreply.github.com>
2023-12-12 04:08:51 +00:00