mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-30 23:08:59 -06:00
Also in the tests
This commit is contained in:
@@ -20,6 +20,7 @@ from django.db.migrations.executor import MigrationExecutor
|
|||||||
from django.test import TransactionTestCase
|
from django.test import TransactionTestCase
|
||||||
from django.test import override_settings
|
from django.test import override_settings
|
||||||
|
|
||||||
|
from documents.consumer import AsnCheckPlugin
|
||||||
from documents.consumer import ConsumerPlugin
|
from documents.consumer import ConsumerPlugin
|
||||||
from documents.consumer import ConsumerPreflightPlugin
|
from documents.consumer import ConsumerPreflightPlugin
|
||||||
from documents.data_models import ConsumableDocument
|
from documents.data_models import ConsumableDocument
|
||||||
@@ -371,6 +372,14 @@ class GetConsumerMixin:
|
|||||||
"task-id",
|
"task-id",
|
||||||
)
|
)
|
||||||
preflight_plugin.setup()
|
preflight_plugin.setup()
|
||||||
|
asncheck_plugin = AsnCheckPlugin(
|
||||||
|
doc,
|
||||||
|
overrides or DocumentMetadataOverrides(),
|
||||||
|
self.status, # type: ignore
|
||||||
|
self.dirs.scratch_dir,
|
||||||
|
"task-id",
|
||||||
|
)
|
||||||
|
asncheck_plugin.setup()
|
||||||
reader = ConsumerPlugin(
|
reader = ConsumerPlugin(
|
||||||
doc,
|
doc,
|
||||||
overrides or DocumentMetadataOverrides(),
|
overrides or DocumentMetadataOverrides(),
|
||||||
@@ -381,6 +390,7 @@ class GetConsumerMixin:
|
|||||||
reader.setup()
|
reader.setup()
|
||||||
try:
|
try:
|
||||||
preflight_plugin.run()
|
preflight_plugin.run()
|
||||||
|
asncheck_plugin.run()
|
||||||
yield reader
|
yield reader
|
||||||
finally:
|
finally:
|
||||||
reader.cleanup()
|
reader.cleanup()
|
||||||
|
|||||||
Reference in New Issue
Block a user