Updated tests. Since the endpoints are now handled by the unified webhook endpoint we have to be a touch more careful with hotel_ids in testing since it won't accept any code anymore

This commit is contained in:
2025-11-27 14:44:57 +00:00
parent 2b1215a43a
commit 18753826cd
2 changed files with 9 additions and 3 deletions

View File

@@ -96,6 +96,12 @@ def test_config():
"hotel_name": "Test Hotel",
"username": "testuser",
"password": "testpass",
},
{
"hotel_id": "135",
"hotel_name": "Another Hotel",
"username": "anotheruser",
"password": "anotherpass",
}
],
"default_hotel_code": "HOTEL123",
@@ -295,7 +301,7 @@ class TestWixWebhookEndpoint:
def test_wix_webhook_test_endpoint(self, client, sample_wix_form_data):
"""Test the test endpoint works identically."""
response = client.post("/api/webhook/wix-form/test", json=sample_wix_form_data)
response = client.post("/api/webhook/wix-form", json=sample_wix_form_data)
assert response.status_code == HttpStatusCode.OK
data = response.json()
assert data["status"] == "success"
@@ -318,7 +324,7 @@ class TestWixWebhookEndpoint:
with test_form_file.open() as f:
form_data = json.load(f)
response = client.post("/api/webhook/wix-form/test", json=form_data)
response = client.post("/api/webhook/wix-form", json=form_data)
assert response.status_code == HttpStatusCode.OK
data = response.json()
assert data["status"] == "success"

View File

@@ -124,7 +124,7 @@
},
{
"label": "hotelid",
"value": "39054_001"
"value": "135"
},
{
"label": "hotelname",