Skip to content

Commit a5e1069

Browse files
committed
Merge remote-tracking branch 'origin/feature/events' into feature/events
2 parents a641fd1 + a09f2c7 commit a5e1069

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

tests/test_merge_dwca.py

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11

2-
import pandas as pd
3-
from zipfile import ZipFile
4-
from tests import make_meta_xml_str, remove_pretty_print_xml
5-
from tests import make_dwca
6-
from dwcahandler import DwcaHandler, MetaElementTypes
72
from io import BytesIO
3+
from zipfile import ZipFile
4+
5+
import pandas as pd
86
from numpy import nan
97

8+
from dwcahandler import DwcaHandler, MetaElementTypes
9+
from tests import make_dwca, make_meta_xml_str, remove_pretty_print_xml
10+
1011

1112
class TestMergeDwcaContent:
1213

@@ -352,7 +353,8 @@ def test_merge_core_and_ext_records_with_ext_sync(self):
352353

353354
multimedia_df = pd.DataFrame(data=[["1", "https://image1.jpg", "image/jpeg", "StillImage"],
354355
["2", "https://image2.jpg", "image/jpeg", "StillImage"],
355-
["3", "https://image3.jpg", "image/jpeg", "StillImage"]],
356+
["3", "https://image3-0.jpg", "image/jpeg", "StillImage"],
357+
["3", "https://image3-1.jpg", "image/jpeg", "StillImage"]],
356358
columns=["id", "identifier", "format", "type"])
357359

358360
dwca_ext_obj = make_dwca(core_content=occ_df, ext_mult_content=multimedia_df, use_col_idx_as_core_id=0)
@@ -364,7 +366,8 @@ def test_merge_core_and_ext_records_with_ext_sync(self):
364366
columns=["id", "occurrenceID", "scientificName", "decimalLatitude", "decimalLongitude",
365367
"basisOfRecord"])
366368

367-
delta_multimedia_df = pd.DataFrame(data=[["3", "https://new-image3.webp", "image/webp", "StillImage", "RightsHolder3"],
369+
delta_multimedia_df = pd.DataFrame(data=[["3", "https://image3-0.jpg", "image/jpeg", "StillImage", nan],
370+
["3", "https://new-image3.webp", "image/webp", "StillImage", "RightsHolder3"],
368371
["4", "https://image4.webp", "image/webp", "StillImage", nan],
369372
["5", "https://image5.webp", "image/webp", "StillImage", "RightsHolder5"],
370373
["6", "https://image6.webp", "image/webp", "StillImage", "RightsHolder6"]],
@@ -393,6 +396,7 @@ def test_merge_core_and_ext_records_with_ext_sync(self):
393396

394397
expected_multimedia_df = pd.DataFrame(data=[["1", "https://image1.jpg", "image/jpeg", "StillImage", nan],
395398
["2", "https://image2.jpg", "image/jpeg", "StillImage", nan],
399+
["3", "https://image3-0.jpg", "image/jpeg", "StillImage", nan],
396400
["3", "https://new-image3.webp", "image/webp", "StillImage", "RightsHolder3"],
397401
["4", "https://image4.webp", "image/webp", "StillImage", nan],
398402
["5", "https://image5.webp", "image/webp", "StillImage", "RightsHolder5"],

0 commit comments

Comments
 (0)