예제 #1
0
 def test_write_manifest(self, mock_create_manifest, mock_makedirs):
     input_manifests = InputManifests("test")
     input_manifests.write_manifest('0.1.2', [])
     mock_create_manifest.assert_called_with('0.1.2', [])
     mock_makedirs.assert_called_with(os.path.join(
         InputManifests.manifests_path(), '0.1.2'),
                                      exist_ok=True)
     mock_create_manifest.return_value.to_file.assert_called_with(
         os.path.join(InputManifests.manifests_path(), '0.1.2',
                      'test-0.1.2.yml'))
예제 #2
0
 def test_write_manifest(self, mock_create_manifest: MagicMock,
                         mock_makedirs: MagicMock) -> None:
     input_manifests = InputManifests("opensearch")
     input_manifests.write_manifest('0.1.2', [])
     mock_create_manifest.assert_called_with('0.1.2', [])
     mock_makedirs.assert_called_with(os.path.join(
         InputManifests.manifests_path(), '0.1.2'),
                                      exist_ok=True)
     mock_create_manifest.return_value.to_file.assert_called_with(
         os.path.join(InputManifests.manifests_path(), '0.1.2',
                      'opensearch-0.1.2.yml'))