From 6102194712e2607dd62d5e42a716986329882e40 Mon Sep 17 00:00:00 2001 From: Jonas Linter Date: Tue, 7 Oct 2025 10:24:01 +0200 Subject: [PATCH] moved tests --- .vscode/settings.json | 6 +- {test => tests}/test_alpine_bits_helper.py | 0 {test => tests}/test_alpine_bits_server.py | 0 .../test_alpine_bits_server_read.py | 0 .../test_alpinebits_server_ping.py | 0 .../test_data/Handshake-OTA_PingRQ.xml | 0 .../test_data/Handshake-OTA_PingRS.xml | 0 {test => tests}/test_data/test_form1.json | 0 {test => tests}/test_data/test_form2.json | 0 {test => tests}/test_data/test_form3.json | 0 {test => tests}/test_data/test_form4.json | 0 tests/test_output/actual_ping_response.xml | 64 +++++++++++++++ tests/test_output/expected_ping_response.xml | 81 +++++++++++++++++++ 13 files changed, 149 insertions(+), 2 deletions(-) rename {test => tests}/test_alpine_bits_helper.py (100%) rename {test => tests}/test_alpine_bits_server.py (100%) rename {test => tests}/test_alpine_bits_server_read.py (100%) rename {test => tests}/test_alpinebits_server_ping.py (100%) rename {test => tests}/test_data/Handshake-OTA_PingRQ.xml (100%) rename {test => tests}/test_data/Handshake-OTA_PingRS.xml (100%) rename {test => tests}/test_data/test_form1.json (100%) rename {test => tests}/test_data/test_form2.json (100%) rename {test => tests}/test_data/test_form3.json (100%) rename {test => tests}/test_data/test_form4.json (100%) create mode 100644 tests/test_output/actual_ping_response.xml create mode 100644 tests/test_output/expected_ping_response.xml diff --git a/.vscode/settings.json b/.vscode/settings.json index c128d0f..65a6d92 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,10 @@ { "python.testing.pytestArgs": [ - "test" + "tests" ], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, - "python.analysis.typeCheckingMode": "basic" + "python.analysis.typeCheckingMode": "basic", + "python.terminal.activateEnvironment": true, + "python-envs.defaultEnvManager": "uv", } \ No newline at end of file diff --git a/test/test_alpine_bits_helper.py b/tests/test_alpine_bits_helper.py similarity index 100% rename from test/test_alpine_bits_helper.py rename to tests/test_alpine_bits_helper.py diff --git a/test/test_alpine_bits_server.py b/tests/test_alpine_bits_server.py similarity index 100% rename from test/test_alpine_bits_server.py rename to tests/test_alpine_bits_server.py diff --git a/test/test_alpine_bits_server_read.py b/tests/test_alpine_bits_server_read.py similarity index 100% rename from test/test_alpine_bits_server_read.py rename to tests/test_alpine_bits_server_read.py diff --git a/test/test_alpinebits_server_ping.py b/tests/test_alpinebits_server_ping.py similarity index 100% rename from test/test_alpinebits_server_ping.py rename to tests/test_alpinebits_server_ping.py diff --git a/test/test_data/Handshake-OTA_PingRQ.xml b/tests/test_data/Handshake-OTA_PingRQ.xml similarity index 100% rename from test/test_data/Handshake-OTA_PingRQ.xml rename to tests/test_data/Handshake-OTA_PingRQ.xml diff --git a/test/test_data/Handshake-OTA_PingRS.xml b/tests/test_data/Handshake-OTA_PingRS.xml similarity index 100% rename from test/test_data/Handshake-OTA_PingRS.xml rename to tests/test_data/Handshake-OTA_PingRS.xml diff --git a/test/test_data/test_form1.json b/tests/test_data/test_form1.json similarity index 100% rename from test/test_data/test_form1.json rename to tests/test_data/test_form1.json diff --git a/test/test_data/test_form2.json b/tests/test_data/test_form2.json similarity index 100% rename from test/test_data/test_form2.json rename to tests/test_data/test_form2.json diff --git a/test/test_data/test_form3.json b/tests/test_data/test_form3.json similarity index 100% rename from test/test_data/test_form3.json rename to tests/test_data/test_form3.json diff --git a/test/test_data/test_form4.json b/tests/test_data/test_form4.json similarity index 100% rename from test/test_data/test_form4.json rename to tests/test_data/test_form4.json diff --git a/tests/test_output/actual_ping_response.xml b/tests/test_output/actual_ping_response.xml new file mode 100644 index 0000000..710f8aa --- /dev/null +++ b/tests/test_output/actual_ping_response.xml @@ -0,0 +1,64 @@ + + + + + { + "versions": [ + { + "version": "2024-10", + "actions": [ + { + "action": "action_OTA_Read" + }, + { + "action": "action_OTA_HotelResNotif_GuestRequests" + } + ] + }, + { + "version": "2022-10", + "actions": [ + { + "action": "action_OTA_Ping" + }, + { + "action": "action_OTA_Read" + }, + { + "action": "action_OTA_HotelResNotif_GuestRequests" + } + ] + } + ] +} + + { + "versions": [ + { + "version": "2024-10", + "actions": [ + { + "action": "action_OTA_Read" + }, + { + "action": "action_OTA_HotelResNotif_GuestRequests" + } + ] + }, + { + "version": "2022-10", + "actions": [ + { + "action": "action_OTA_Read" + }, + { + "action": "action_OTA_Ping" + }, + { + "action": "action_OTA_HotelResNotif_GuestRequests" + } + ] + } + ] +} + diff --git a/tests/test_output/expected_ping_response.xml b/tests/test_output/expected_ping_response.xml new file mode 100644 index 0000000..555c9c9 --- /dev/null +++ b/tests/test_output/expected_ping_response.xml @@ -0,0 +1,81 @@ + + + + + + + + { + "versions": [ + { + "version": "2024-10", + "actions": [ + { + "action": "action_OTA_Read" + }, + { + "action": "action_OTA_HotelResNotif_GuestRequests" + } + ] + }, + { + "version": "2022-10", + "actions": [ + { + "action": "action_OTA_Ping" + }, + { + "action": "action_OTA_Read" + }, + { + "action": "action_OTA_HotelResNotif_GuestRequests" + } + ] + } + ] +} + + { + "versions": [ + { + "version": "2024-10", + "actions": [ + { + "action": "action_OTA_Read" + }, + { + "action": "action_OTA_HotelResNotif_GuestRequests" + } + ] + }, + { + "version": "2022-10", + "actions": [ + { + "action": "action_OTA_Read" + }, + { + "action": "action_OTA_Ping" + }, + { + "action": "action_OTA_HotelResNotif_GuestRequests" + } + ] + } + ] +} + \ No newline at end of file