Skip to content

Commit

Permalink
Fixing formating and removing unecessary code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitri committed Oct 29, 2024
1 parent f806c06 commit 3cca6f6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 0 additions & 2 deletions processes/ingest/chicago_isac.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class ChicagoISACProcess(CoreProcess):
def __init__(self, *args):
super(ChicagoISACProcess, self).__init__(*args[:4])

self.full_import = self.process == 'complete'

self.generateEngine()
self.createSession()

Expand Down
9 changes: 1 addition & 8 deletions tests/unit/processes/ingest/test_chicago_isac_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ def test_store_pdf_manifest(self, test_process, mocker):
mock_generate_man.assert_called_once_with(mock_record, 'test_url', test_manifest_url)
mock_create_man.assert_called_once_with('manifests/isac/1.json', 'test_json')

def test_create_manifest_in_S3(self, test_process, mocker):
mock_put = mocker.patch.object(ChicagoISACProcess, 'putObjectInBucket')

test_process.createManifestInS3('test_path', '{"data": "test_json"}')

mock_put.assert_called_once_with(b'{"data": "test_json"}', 'test_path', 'test_aws_bucket')

def test_generate_manifest(self, mocker):
mock_manifest = mocker.MagicMock(links=[])
mock_manifest.toJson.return_value = 'test_json'
Expand All @@ -101,4 +94,4 @@ def test_generate_manifest(self, mocker):
assert mock_manifest.links[0] == {'rel': 'self', 'href': 'manifest_url', 'type': 'application/webpub+json'}

mock_manifest.addMetadata.assert_called_once_with(mock_record, conformsTo='test_profile_uri')
mock_manifest.addChapter.assert_called_once_with('source_url', 'test_title')
mock_manifest.addChapter.assert_called_once_with('source_url', 'test_title')

0 comments on commit 3cca6f6

Please sign in to comment.