mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-21 02:03:30 +00:00
Chore(deps): Bump the utilities-minor group across 1 directory with 7 updates (#12174)
* Chore(deps): Bump the utilities-minor group across 1 directory with 7 updates Bumps the utilities-minor group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [django-guardian](https://github.com/django-guardian/django-guardian) | `3.2.0` | `3.3.0` | | [filelock](https://github.com/tox-dev/py-filelock) | `3.20.3` | `3.24.3` | | [openai](https://github.com/openai/openai-python) | `2.17.0` | `2.24.0` | | [regex](https://github.com/mrabarnett/mrab-regex) | `2026.1.15` | `2026.2.19` | | [pytest-django](https://github.com/pytest-dev/pytest-django) | `4.11.1` | `4.12.0` | | [pytest-env](https://github.com/pytest-dev/pytest-env) | `1.2.0` | `1.5.0` | | [pyrefly](https://github.com/facebook/pyrefly) | `0.51.0` | `0.54.0` | Updates `django-guardian` from 3.2.0 to 3.3.0 - [Release notes](https://github.com/django-guardian/django-guardian/releases) - [Commits](https://github.com/django-guardian/django-guardian/compare/3.2.0...3.3.0) Updates `filelock` from 3.20.3 to 3.24.3 - [Release notes](https://github.com/tox-dev/py-filelock/releases) - [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst) - [Commits](https://github.com/tox-dev/py-filelock/compare/3.20.3...3.24.3) Updates `openai` from 2.17.0 to 2.24.0 - [Release notes](https://github.com/openai/openai-python/releases) - [Changelog](https://github.com/openai/openai-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/openai/openai-python/compare/v2.17.0...v2.24.0) Updates `regex` from 2026.1.15 to 2026.2.19 - [Changelog](https://github.com/mrabarnett/mrab-regex/blob/hg/changelog.txt) - [Commits](https://github.com/mrabarnett/mrab-regex/compare/2026.1.15...2026.2.19) Updates `pytest-django` from 4.11.1 to 4.12.0 - [Release notes](https://github.com/pytest-dev/pytest-django/releases) - [Changelog](https://github.com/pytest-dev/pytest-django/blob/main/docs/changelog.rst) - [Commits](https://github.com/pytest-dev/pytest-django/compare/v4.11.1...v4.12.0) Updates `pytest-env` from 1.2.0 to 1.5.0 - [Release notes](https://github.com/pytest-dev/pytest-env/releases) - [Commits](https://github.com/pytest-dev/pytest-env/compare/1.2.0...1.5.0) Updates `pyrefly` from 0.51.0 to 0.54.0 - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.51.0...0.54.0) --- updated-dependencies: - dependency-name: django-guardian dependency-version: 3.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: utilities-minor - dependency-name: filelock dependency-version: 3.24.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: utilities-minor - dependency-name: openai dependency-version: 2.24.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: utilities-minor - dependency-name: regex dependency-version: 2026.2.19 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: utilities-minor - dependency-name: pytest-django dependency-version: 4.12.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: utilities-minor - dependency-name: pytest-env dependency-version: 1.5.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: utilities-minor - dependency-name: pyrefly dependency-version: 0.54.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: utilities-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Fixes the additional unlink now done by filelock --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
This commit is contained in:
co-authored by
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Trenton H
parent
fff1aa2a34
commit
5e1202a416
@@ -45,10 +45,22 @@ class TestDocument(TestCase):
|
||||
Path(file_path).touch()
|
||||
Path(thumb_path).touch()
|
||||
|
||||
with mock.patch("documents.signals.handlers.Path.unlink") as mock_unlink:
|
||||
with mock.patch(
|
||||
"documents.signals.handlers.Path.unlink",
|
||||
autospec=True,
|
||||
) as mock_unlink:
|
||||
document.delete()
|
||||
empty_trash([document.pk])
|
||||
self.assertEqual(mock_unlink.call_count, 2)
|
||||
|
||||
target_paths: set[str] = {str(file_path), str(thumb_path)}
|
||||
|
||||
actual_deletions = [
|
||||
call
|
||||
for call in mock_unlink.call_args_list
|
||||
if str(call.args[0]) in target_paths
|
||||
]
|
||||
|
||||
self.assertEqual(len(actual_deletions), 2)
|
||||
|
||||
def test_document_soft_delete(self) -> None:
|
||||
document = Document.objects.create(
|
||||
@@ -65,7 +77,12 @@ class TestDocument(TestCase):
|
||||
Path(file_path).touch()
|
||||
Path(thumb_path).touch()
|
||||
|
||||
with mock.patch("documents.signals.handlers.Path.unlink") as mock_unlink:
|
||||
target_paths: set[str] = {str(file_path), str(thumb_path)}
|
||||
|
||||
with mock.patch(
|
||||
"documents.signals.handlers.Path.unlink",
|
||||
autospec=True,
|
||||
) as mock_unlink:
|
||||
document.delete()
|
||||
self.assertEqual(mock_unlink.call_count, 0)
|
||||
|
||||
@@ -76,7 +93,14 @@ class TestDocument(TestCase):
|
||||
|
||||
document.delete()
|
||||
empty_trash([document.pk])
|
||||
self.assertEqual(mock_unlink.call_count, 2)
|
||||
|
||||
actual_deletions = [
|
||||
call
|
||||
for call in mock_unlink.call_args_list
|
||||
if str(call.args[0]) in target_paths
|
||||
]
|
||||
|
||||
self.assertEqual(len(actual_deletions), 2)
|
||||
|
||||
def test_delete_root_deletes_versions(self) -> None:
|
||||
root = Document.objects.create(
|
||||
|
||||
Reference in New Issue
Block a user