Small improvement to the consumer status with stronger typing

This commit is contained in:
Trenton Holmes
2023-07-22 16:51:05 -07:00
committed by Trenton H
parent 802e5591ce
commit 07e7bcd30b
3 changed files with 103 additions and 41 deletions

View File

@@ -21,6 +21,7 @@ from django.utils import timezone
from documents.consumer import Consumer
from documents.consumer import ConsumerError
from documents.consumer import ConsumerFilePhase
from documents.models import Correspondent
from documents.models import Document
from documents.models import DocumentType
@@ -228,8 +229,8 @@ def fake_magic_from_file(file, mime=False):
class TestConsumer(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
def _assert_first_last_send_progress(
self,
first_status="STARTING",
last_status="SUCCESS",
first_status=ConsumerFilePhase.STARTED,
last_status=ConsumerFilePhase.SUCCESS,
first_progress=0,
first_progress_max=100,
last_progress=100,