Skip to content

Commit badad56

Browse files
committed
updated METS package publishing + tests
1 parent 9fa2548 commit badad56

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

dags/pipelines/notice_processor_pipelines.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def notice_validation_pipeline(notice: Notice, mongodb_client: MongoClient) -> N
8484
return NoticePipelineOutput(notice=notice)
8585

8686

87-
def notice_package_pipeline(notice: Notice) -> NoticePipelineOutput:
87+
def notice_package_pipeline(notice: Notice, mongodb_client: MongoClient = None) -> NoticePipelineOutput:
8888
"""
8989
9090
"""
@@ -101,7 +101,7 @@ def notice_package_pipeline(notice: Notice) -> NoticePipelineOutput:
101101
return NoticePipelineOutput(notice=packaged_notice)
102102

103103

104-
def notice_publish_pipeline(notice: Notice) -> NoticePipelineOutput:
104+
def notice_publish_pipeline(notice: Notice, mongodb_client: MongoClient = None) -> NoticePipelineOutput:
105105
"""
106106
107107
"""

tests/features/notice_publisher/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def publish_eligible_notice(publicly_available_notice) -> Notice:
3030
notice = publicly_available_notice
3131
notice.update_status_to(NoticeStatus.ELIGIBLE_FOR_PUBLISHING)
3232
notice._mets_manifestation = METSManifestation(
33-
object_data=base64.b64encode("METS manifestation content".encode("utf-8")))
33+
object_data=base64.b64encode("METS manifestation content".encode("utf-8")),
34+
package_name="test_package.zip"
35+
)
3436
return notice
3537

3638

tests/features/notice_publisher/test_notice_publisher.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from ted_sws.core.model.notice import Notice, NoticeStatus
1111
from ted_sws.data_manager.adapters.repository_abc import NoticeRepositoryABC
1212
from ted_sws.notice_publisher.adapters.sftp_notice_publisher import SFTPPublisher
13-
from ted_sws.notice_publisher.adapters.sftp_publisher_abc import SFTPPublisherABC
1413
from ted_sws.notice_publisher.services.notice_publisher import publish_notice, publish_notice_by_id
1514

1615

0 commit comments

Comments
 (0)