mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-12 00:19:48 +00:00
Documentation: Fix typos with automated tool (#5319)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
@@ -1276,7 +1276,7 @@ class TestDocumentApi(DirectoriesMixin, DocumentConsumeDelayMixin, APITestCase):
|
||||
GIVEN:
|
||||
- NUMBER_OF_SUGGESTED_DATES = 0 (disables feature)
|
||||
WHEN:
|
||||
- API reuqest for document suggestions
|
||||
- API request for document suggestions
|
||||
THEN:
|
||||
- Dont check for suggested dates at all
|
||||
"""
|
||||
@@ -1526,7 +1526,7 @@ class TestDocumentApi(DirectoriesMixin, DocumentConsumeDelayMixin, APITestCase):
|
||||
GIVEN:
|
||||
- A document with a single note
|
||||
WHEN:
|
||||
- API reuqest for document notes is made
|
||||
- API request for document notes is made
|
||||
THEN:
|
||||
- The associated note is returned
|
||||
"""
|
||||
|
@@ -55,7 +55,7 @@ class TestDocumentSearchApi(DirectoriesMixin, APITestCase):
|
||||
with AsyncWriter(index.open_index()) as writer:
|
||||
# Note to future self: there is a reason we dont use a model signal handler to update the index: some operations edit many documents at once
|
||||
# (retagger, renamer) and we don't want to open a writer for each of these, but rather perform the entire operation with one writer.
|
||||
# That's why we cant open the writer in a model on_save handler or something.
|
||||
# That's why we can't open the writer in a model on_save handler or something.
|
||||
index.update_document(writer, d1)
|
||||
index.update_document(writer, d2)
|
||||
index.update_document(writer, d3)
|
||||
@@ -903,8 +903,8 @@ class TestDocumentSearchApi(DirectoriesMixin, APITestCase):
|
||||
GIVEN:
|
||||
- Documents with owners set & without
|
||||
WHEN:
|
||||
- API reuqest for advanced query (search) is made by non-superuser
|
||||
- API reuqest for advanced query (search) is made by superuser
|
||||
- API request for advanced query (search) is made by non-superuser
|
||||
- API request for advanced query (search) is made by superuser
|
||||
THEN:
|
||||
- Only owned docs are returned for regular users
|
||||
- All docs are returned for superuser
|
||||
@@ -959,7 +959,7 @@ class TestDocumentSearchApi(DirectoriesMixin, APITestCase):
|
||||
GIVEN:
|
||||
- Documents with granted view permissions to others
|
||||
WHEN:
|
||||
- API reuqest for advanced query (search) is made by user
|
||||
- API request for advanced query (search) is made by user
|
||||
THEN:
|
||||
- Only docs with granted view permissions are returned
|
||||
"""
|
||||
|
@@ -212,8 +212,8 @@ class TestDate(TestCase):
|
||||
|
||||
def test_multiple_dates(self):
|
||||
text = """This text has multiple dates.
|
||||
For example 02.02.2018, 22 July 2022 and Dezember 2021.
|
||||
But not 24-12-9999 because its in the future..."""
|
||||
For example 02.02.2018, 22 July 2022 and December 2021.
|
||||
But not 24-12-9999 because it's in the future..."""
|
||||
dates = list(parse_date_generator("", text))
|
||||
self.assertEqual(len(dates), 3)
|
||||
self.assertEqual(
|
||||
|
@@ -43,7 +43,7 @@ class TestDelayedQuery(TestCase):
|
||||
)
|
||||
|
||||
def test_get_permission_criteria(self):
|
||||
# tests contains touples of user instances and the expected filter
|
||||
# tests contains tuples of user instances and the expected filter
|
||||
tests = (
|
||||
(None, [query.Term("has_owner", False)]),
|
||||
(User(42, username="foo", is_superuser=True), []),
|
||||
@@ -113,7 +113,7 @@ class TestDelayedQuery(TestCase):
|
||||
)
|
||||
|
||||
def test_tags_query_filters(self):
|
||||
# tests contains touples of query_parameter dics and the expected whoosh query
|
||||
# tests contains tuples of query_parameter dics and the expected whoosh query
|
||||
param = "tags"
|
||||
field, _ = DelayedQuery.param_map[param]
|
||||
tests = (
|
||||
|
@@ -165,7 +165,7 @@ class TestMigrateToEncrytpedWebPThumbnails(TestMigrations):
|
||||
):
|
||||
"""
|
||||
GIVEN:
|
||||
- Encrytped document exists with existing encrypted WebP thumbnail path
|
||||
- Encrypted document exists with existing encrypted WebP thumbnail path
|
||||
WHEN:
|
||||
- Migration is attempted
|
||||
THEN:
|
||||
|
Reference in New Issue
Block a user