fix(parsers|test_api): fix failed tests

This commit is contained in:
Matthias Eck 2022-08-06 17:17:59 +00:00
parent 1cc1ee36c6
commit 05d97d2cf1
2 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import shutil
import subprocess import subprocess
import tempfile import tempfile
from typing import Iterator from typing import Iterator
from typing import Match
from typing import Optional from typing import Optional
from typing import Set from typing import Set
@ -252,7 +253,7 @@ def parse_date_generator(filename, text) -> Iterator[datetime.datetime]:
return None return None
def __process_match( def __process_match(
match: re.Match[str], match: Match[str],
date_order: str, date_order: str,
) -> Optional[datetime.datetime]: ) -> Optional[datetime.datetime]:
date_string = match.group(0) date_string = match.group(0)

View File

@ -1119,6 +1119,7 @@ class TestDocumentApi(DirectoriesMixin, APITestCase):
@mock.patch("documents.views.match_document_types") @mock.patch("documents.views.match_document_types")
@mock.patch("documents.views.match_tags") @mock.patch("documents.views.match_tags")
@mock.patch("documents.views.match_correspondents") @mock.patch("documents.views.match_correspondents")
@override_settings(NUMBER_OF_SUGGESTED_DATES=10)
def test_get_suggestions( def test_get_suggestions(
self, self,
match_correspondents, match_correspondents,