Replaced config auth with db auth
This commit is contained in:
@@ -17,6 +17,7 @@ from alpine_bits_python.alpinebits_server import AlpineBitsServer
|
||||
from alpine_bits_python.api import app
|
||||
from alpine_bits_python.const import HttpStatusCode
|
||||
from alpine_bits_python.db import Base, Hotel, RoomAvailability
|
||||
from alpine_bits_python.hotel_service import hash_password
|
||||
|
||||
|
||||
def build_request_xml(body: str, include_unique_id: bool = True) -> str:
|
||||
@@ -118,7 +119,7 @@ def seed_hotel_if_missing(client: TestClient):
|
||||
hotel_id="HOTEL123",
|
||||
hotel_name="Integration Hotel",
|
||||
username="testuser",
|
||||
password_hash="integration-hash",
|
||||
password_hash=hash_password("testpass"),
|
||||
created_at=datetime.now(UTC),
|
||||
updated_at=datetime.now(UTC),
|
||||
is_active=True,
|
||||
|
||||
@@ -12,6 +12,7 @@ from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_asyn
|
||||
from alpine_bits_python.alpinebits_server import AlpineBitsClientInfo, Version
|
||||
from alpine_bits_python.const import HttpStatusCode
|
||||
from alpine_bits_python.db import Base, Hotel, HotelInventory, RoomAvailability
|
||||
from alpine_bits_python.hotel_service import hash_password
|
||||
from alpine_bits_python.free_rooms_action import FreeRoomsAction
|
||||
|
||||
|
||||
@@ -78,7 +79,7 @@ async def insert_test_hotel(session: AsyncSession, hotel_id: str = "TESTHOTEL"):
|
||||
hotel_id=hotel_id,
|
||||
hotel_name="Unit Test Hotel",
|
||||
username="testuser",
|
||||
password_hash="bcrypt-hash",
|
||||
password_hash=hash_password("testpass"),
|
||||
created_at=datetime.now(UTC),
|
||||
updated_at=datetime.now(UTC),
|
||||
is_active=True,
|
||||
|
||||
@@ -23,6 +23,7 @@ from alpine_bits_python.api import app
|
||||
from alpine_bits_python.const import WebhookStatus
|
||||
from alpine_bits_python.db import Base, Reservation, WebhookRequest
|
||||
from alpine_bits_python.db_setup import reprocess_stuck_webhooks
|
||||
from alpine_bits_python.hotel_service import hash_password
|
||||
from alpine_bits_python.schemas import WebhookRequestData
|
||||
from alpine_bits_python.webhook_processor import initialize_webhook_processors, webhook_registry
|
||||
|
||||
@@ -206,7 +207,7 @@ class TestWebhookReprocessing:
|
||||
hotel_id="HOTEL123",
|
||||
hotel_name="Test Hotel",
|
||||
username="testuser",
|
||||
password_hash="dummy",
|
||||
password_hash=hash_password("testpass"),
|
||||
created_at=datetime.now(UTC),
|
||||
updated_at=datetime.now(UTC),
|
||||
is_active=True,
|
||||
@@ -291,7 +292,7 @@ class TestWebhookReprocessingNeverBlocksStartup:
|
||||
hotel_id="HOTEL123",
|
||||
hotel_name="Test Hotel",
|
||||
username="testuser",
|
||||
password_hash="dummy",
|
||||
password_hash=hash_password("testpass"),
|
||||
created_at=datetime.now(UTC),
|
||||
updated_at=datetime.now(UTC),
|
||||
is_active=True,
|
||||
|
||||
Reference in New Issue
Block a user