diff --git a/tests/test_conversion_service.py b/tests/test_conversion_service.py index c10da92..8a762a6 100644 --- a/tests/test_conversion_service.py +++ b/tests/test_conversion_service.py @@ -77,13 +77,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", } @@ -124,7 +124,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, ) @@ -141,6 +141,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) @@ -157,7 +159,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}") @@ -195,7 +197,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, ) @@ -265,7 +267,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, )