Files
alpinebits_python/test_handshake.py
Jonas Linter 4ac5a148b6 Cleanup
2025-10-10 10:45:47 +02:00

30 lines
643 B
Python

#!/usr/bin/env python3
"""Test the handshake functionality with the real AlpineBits sample file."""
import asyncio
from alpine_bits_python.alpinebits_server import AlpineBitsServer
async def main():
# Create server instance
server = AlpineBitsServer()
# Read the sample handshake request
with open(
"AlpineBits-HotelData-2024-10/files/samples/Handshake/Handshake-OTA_PingRQ.xml",
) as f:
ping_request_xml = f.read()
# Handle the ping request
await server.handle_request(
"OTA_Ping:Handshaking", ping_request_xml, "2024-10"
)
if __name__ == "__main__":
asyncio.run(main())