diff --git a/tests/test_conversion_service.py b/tests/test_conversion_service.py index 615f8d3..a526dfd 100644 --- a/tests/test_conversion_service.py +++ b/tests/test_conversion_service.py @@ -66,13 +66,13 @@ def test_config(): }, "alpine_bits_auth": [ { - "hotel_id": "bemelmans", + "hotel_id": "39054_001", "hotel_name": "Bemelmans Apartments", "username": "bemelmans_user", "password": "testpass", } ], - "default_hotel_code": "bemelmans", + "default_hotel_code": "39054_001", "default_hotel_name": "Bemelmans Apartments", } @@ -113,7 +113,7 @@ class TestConversionServiceWithImportedData: importer = CSVImporter(test_db_session, test_config) csv_stats = await importer.import_csv_file( csv_file_path=str(csv_file), - hotel_code="bemelmans", + hotel_code="39054_001", dryrun=False, ) @@ -130,6 +130,8 @@ class TestConversionServiceWithImportedData: # File already has proper XML structure, just use it as-is xml_content = xml_content.strip() + ## Need to check if reservations and customers are now actually available in the db before proceeding + conversion_service = ConversionService(test_db_session) stats = await conversion_service.process_conversion_xml(xml_content) @@ -146,7 +148,7 @@ class TestConversionServiceWithImportedData: EXPECTED_TOTAL_ROOMS = 539 # Note: Currently no matches by tracking ID because XML data uses different formats # This is expected with the test data. Real PMS data would have higher match rates. - EXPECTED_MATCHED_TO_RESERVATION = 0 + EXPECTED_MATCHED_TO_RESERVATION = 19 print(f"\nBaseline Match Counts:") print(f" Total reservations in XML: {EXPECTED_TOTAL_RESERVATIONS}") @@ -184,7 +186,7 @@ class TestConversionServiceWithImportedData: importer = CSVImporter(test_db_session, test_config) await importer.import_csv_file( csv_file_path=str(csv_file), - hotel_code="bemelmans", + hotel_code="39054_001", dryrun=False, ) @@ -254,7 +256,7 @@ class TestConversionServiceWithImportedData: importer = CSVImporter(test_db_session, test_config) csv_stats = await importer.import_csv_file( csv_file_path=str(csv_file), - hotel_code="bemelmans", + hotel_code="39054_001", dryrun=False, )