liberty-framework 6.0.47__py3-none-any.whl → 6.0.49__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. {liberty_framework-6.0.47.dist-info → liberty_framework-6.0.49.dist-info}/METADATA +3 -1
  2. liberty_framework-6.0.49.dist-info/RECORD +97 -0
  3. liberty_framework-6.0.49.dist-info/top_level.txt +1 -0
  4. app/.DS_Store +0 -0
  5. app/__pycache__/__init__.cpython-312.pyc +0 -0
  6. app/__pycache__/main.cpython-312.pyc +0 -0
  7. app/__pycache__/test.cpython-312.pyc +0 -0
  8. app/alembic/__pycache__/__init__.cpython-312.pyc +0 -0
  9. app/alembic/__pycache__/env.cpython-312.pyc +0 -0
  10. app/alembic/versions/__pycache__/07301a1e0a40_upgrade.cpython-312.pyc +0 -0
  11. app/alembic/versions/__pycache__/6d15b02a5d62_upgrade.cpython-312.pyc +0 -0
  12. app/alembic/versions/__pycache__/97ce2af21b7b_upgrade.cpython-312.pyc +0 -0
  13. app/alembic/versions/__pycache__/abebaaa0b8b5_upgrade.cpython-312.pyc +0 -0
  14. app/alembic/versions/__pycache__/dd5d460a6436_upgrade.cpython-312.pyc +0 -0
  15. app/alembic/versions/__pycache__/ecb84318e633_upgrade.cpython-312.pyc +0 -0
  16. app/alembic/versions/__pycache__/f93e0f531f2a_upgrade.cpython-312.pyc +0 -0
  17. app/alembic/versions/__pycache__/feb86bf02dac_upgrade.cpython-312.pyc +0 -0
  18. app/business/__pycache__/__init__.cpython-312.pyc +0 -0
  19. app/business/__pycache__/oracle.cpython-312.pyc +0 -0
  20. app/business/__pycache__/postgres.cpython-312.pyc +0 -0
  21. app/config/__pycache__/__init__.cpython-312.pyc +0 -0
  22. app/config/__pycache__/config.cpython-312.pyc +0 -0
  23. app/controllers/__pycache__/__init__.cpython-312.pyc +0 -0
  24. app/controllers/__pycache__/api_controller.cpython-312.pyc +0 -0
  25. app/controllers/__pycache__/react_controller.cpython-312.pyc +0 -0
  26. app/controllers/__pycache__/setup_controller.cpython-312.pyc +0 -0
  27. app/controllers/__pycache__/socket_controller.cpython-312.pyc +0 -0
  28. app/database/__pycache__/__init__.cpython-312.pyc +0 -0
  29. app/database/__pycache__/base_dao.cpython-312.pyc +0 -0
  30. app/database/__pycache__/config.cpython-312.pyc +0 -0
  31. app/database/__pycache__/dao_factory.cpython-312.pyc +0 -0
  32. app/database/__pycache__/ora_dao.cpython-312.pyc +0 -0
  33. app/database/__pycache__/oracle_dao.cpython-312.pyc +0 -0
  34. app/database/__pycache__/pg_dao.cpython-312.pyc +0 -0
  35. app/database/__pycache__/postgres_dao.cpython-312.pyc +0 -0
  36. app/logs/.DS_Store +0 -0
  37. app/logs/__pycache__/__init__.cpython-312.pyc +0 -0
  38. app/logs/__pycache__/logs.cpython-312.pyc +0 -0
  39. app/logs/files/logs-frontend-json.log +0 -209
  40. app/logs/files/logs-frontend-text.log +0 -836
  41. app/models/__pycache__/__init__.cpython-312.pyc +0 -0
  42. app/models/__pycache__/ai.cpython-312.pyc +0 -0
  43. app/models/__pycache__/apidb.cpython-312.pyc +0 -0
  44. app/models/__pycache__/applications.cpython-312.pyc +0 -0
  45. app/models/__pycache__/auth.cpython-312.pyc +0 -0
  46. app/models/__pycache__/base.cpython-312.pyc +0 -0
  47. app/models/__pycache__/checkdb.cpython-312.pyc +0 -0
  48. app/models/__pycache__/modules.cpython-312.pyc +0 -0
  49. app/models/__pycache__/pool.cpython-312.pyc +0 -0
  50. app/models/__pycache__/setup.cpython-312.pyc +0 -0
  51. app/models/__pycache__/themes.cpython-312.pyc +0 -0
  52. app/postgres/.DS_Store +0 -0
  53. app/postgres/__pycache__/__init__.cpython-312.pyc +0 -0
  54. app/postgres/dump/__pycache__/__init__.cpython-312.pyc +0 -0
  55. app/postgres/dump/__pycache__/dump.cpython-312.pyc +0 -0
  56. app/public/__pycache__/__init__.cpython-312.pyc +0 -0
  57. app/routes/__pycache__/__init__.cpython-312.pyc +0 -0
  58. app/routes/__pycache__/api_routes.cpython-312.pyc +0 -0
  59. app/routes/__pycache__/react_routes.cpython-312.pyc +0 -0
  60. app/routes/__pycache__/setup_routes.cpython-312.pyc +0 -0
  61. app/routes/__pycache__/socket_routes.cpython-312.pyc +0 -0
  62. app/services/__pycache__/__init__.cpython-312.pyc +0 -0
  63. app/services/__pycache__/alembic.cpython-312.pyc +0 -0
  64. app/services/__pycache__/api_rest.cpython-312.pyc +0 -0
  65. app/services/__pycache__/db_pool.cpython-312.pyc +0 -0
  66. app/services/__pycache__/db_query.cpython-312.pyc +0 -0
  67. app/setup/__pycache__/__init__.cpython-312.pyc +0 -0
  68. app/setup/data/__pycache__/__init__.cpython-312.pyc +0 -0
  69. app/setup/data/__pycache__/data.cpython-312.pyc +0 -0
  70. app/setup/models/__pycache__/__init__.cpython-312.pyc +0 -0
  71. app/setup/models/__pycache__/airflow.cpython-312.pyc +0 -0
  72. app/setup/models/__pycache__/liberty.cpython-312.pyc +0 -0
  73. app/setup/models/__pycache__/libnetl.cpython-312.pyc +0 -0
  74. app/setup/models/__pycache__/libnjde.cpython-312.pyc +0 -0
  75. app/setup/models/__pycache__/libnsx1.cpython-312.pyc +0 -0
  76. app/setup/models/__pycache__/models.cpython-312.pyc +0 -0
  77. app/setup/models/__pycache__/nomasx1.cpython-312.pyc +0 -0
  78. app/setup/services/__pycache__/__init__.cpython-312.pyc +0 -0
  79. app/setup/services/__pycache__/alembic.cpython-312.pyc +0 -0
  80. app/setup/services/__pycache__/dump.cpython-312.pyc +0 -0
  81. app/setup/services/__pycache__/init.cpython-312.pyc +0 -0
  82. app/setup/services/__pycache__/install.cpython-312.pyc +0 -0
  83. app/setup/services/__pycache__/models.cpython-312.pyc +0 -0
  84. app/setup/services/__pycache__/setup.cpython-312.pyc +0 -0
  85. app/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  86. app/utils/__pycache__/common.cpython-312.pyc +0 -0
  87. app/utils/__pycache__/encrypt.cpython-312.pyc +0 -0
  88. app/utils/__pycache__/jwt.cpython-312.pyc +0 -0
  89. app/utils/__pycache__/logs.cpython-312.pyc +0 -0
  90. app/utils/__pycache__/models.cpython-312.pyc +0 -0
  91. liberty_framework-6.0.47.dist-info/RECORD +0 -211
  92. liberty_framework-6.0.47.dist-info/top_level.txt +0 -2
  93. tests/__init__.py +0 -0
  94. tests/__pycache__/__init__.cpython-312.pyc +0 -0
  95. tests/__pycache__/conftest.cpython-312-pytest-8.3.4.pyc +0 -0
  96. tests/__pycache__/main.cpython-312.pyc +0 -0
  97. tests/__pycache__/test.cpython-312.pyc +0 -0
  98. tests/conftest.py +0 -15
  99. tests/main.py +0 -13
  100. tests/scenarios/__init__.py +0 -0
  101. tests/scenarios/__pycache__/__init__.cpython-312.pyc +0 -0
  102. tests/scenarios/__pycache__/test_auth_token.cpython-312-pytest-8.3.4.pyc +0 -0
  103. tests/scenarios/__pycache__/test_auth_user.cpython-312-pytest-8.3.4.pyc +0 -0
  104. tests/scenarios/__pycache__/test_db_check.cpython-312-pytest-8.3.4.pyc +0 -0
  105. tests/scenarios/__pycache__/test_db_close.cpython-312-pytest-8.3.4.pyc +0 -0
  106. tests/scenarios/__pycache__/test_db_open.cpython-312-pytest-8.3.4.pyc +0 -0
  107. tests/scenarios/__pycache__/test_fmw_applications.cpython-312-pytest-8.3.4.pyc +0 -0
  108. tests/scenarios/__pycache__/test_fmw_encrypt.cpython-312-pytest-8.3.4.pyc +0 -0
  109. tests/scenarios/__pycache__/test_fmw_modules.cpython-312-pytest-8.3.4.pyc +0 -0
  110. tests/scenarios/__pycache__/test_fmw_themes.cpython-312-pytest-8.3.4.pyc +0 -0
  111. tests/scenarios/test_auth_token.py +0 -38
  112. tests/scenarios/test_auth_user.py +0 -47
  113. tests/scenarios/test_db_check.py +0 -50
  114. tests/scenarios/test_db_close.py +0 -55
  115. tests/scenarios/test_db_open.py +0 -47
  116. tests/scenarios/test_fmw_applications.py +0 -21
  117. tests/scenarios/test_fmw_encrypt.py +0 -20
  118. tests/scenarios/test_fmw_modules.py +0 -19
  119. tests/scenarios/test_fmw_themes.py +0 -26
  120. {liberty_framework-6.0.47.dist-info → liberty_framework-6.0.49.dist-info}/LICENSE +0 -0
  121. {liberty_framework-6.0.47.dist-info → liberty_framework-6.0.49.dist-info}/WHEEL +0 -0
  122. {liberty_framework-6.0.47.dist-info → liberty_framework-6.0.49.dist-info}/entry_points.txt +0 -0
@@ -1,47 +0,0 @@
1
- import pytest
2
- import allure
3
-
4
- from tests.main import VALID_CREDENTIALS
5
-
6
- # Define query parameters required for /auth/user
7
- AUTH_QUERY_PARAMS = {"pool": "default", "mode": "framework", "type": "database"}
8
- OPEN_QUERY_PARAMS = {"framework_pool": "default", "target_pool": "libnsx1"}
9
-
10
- @allure.feature("Authentication")
11
- @allure.story("Check opening database with Valid Token")
12
- def test_open_valid_token(client):
13
- """
14
- Test `api/db/open` by first obtaining a valid JWT token from `/auth/token`.
15
- """
16
- with allure.step("Get a valid token from /auth/token"):
17
- response = client.post("/api/auth/token", json=VALID_CREDENTIALS, params=AUTH_QUERY_PARAMS)
18
- allure.attach(response.text, name="Results", attachment_type=allure.attachment_type.JSON)
19
- assert response.status_code == 200, "Token request failed"
20
- token = response.json()["access_token"]
21
-
22
-
23
- with allure.step("Use token to open database connection from api/db/open"):
24
- response = client.get("api/db/open", params=OPEN_QUERY_PARAMS, headers={"Authorization": f"Bearer {token}"})
25
- allure.attach(response.text, name="Results", attachment_type=allure.attachment_type.JSON)
26
-
27
- with allure.step("Validate response"):
28
- assert response.status_code == 200
29
- response_json = response.json()
30
- assert response_json["status"] == "success", "Status returned is wrong"
31
- assert response_json["message"] == "connected", "Message returned is wrong"
32
-
33
-
34
-
35
- @allure.feature("Authentication")
36
- @allure.story("Fail to open database if not authenticated")
37
- def test_open_invalid_token(client):
38
- """
39
- Test `/api/db/open` with an invalid token.
40
- """
41
- with allure.step("Use an invalid token to open database"):
42
- response = client.get("/api/db/open", params=OPEN_QUERY_PARAMS)
43
- allure.attach(response.text, name="Results", attachment_type=allure.attachment_type.JSON)
44
-
45
- with allure.step("Validate response"):
46
- assert response.status_code == 401 # Unauthorized
47
-
@@ -1,21 +0,0 @@
1
- import allure
2
-
3
- @allure.feature("Framework")
4
- @allure.story("Get list of applications")
5
-
6
- def test_get_modules(client):
7
- """
8
- Test `/api/fmw/applications``.
9
- """
10
- with allure.step("Get list of applications from /api/fmw/applications"):
11
- response = client.get("/api/fmw/applications")
12
- allure.attach(response.text, name="Results", attachment_type=allure.attachment_type.JSON)
13
-
14
- with allure.step("Validate response"):
15
- assert response.status_code == 200, "Applications request failed"
16
- response_json = response.json()
17
- assert "items" in response_json, "Response does not contain 'items'"
18
- assert len(response_json["items"]) > 0, "Response 'items' list is empty"
19
- assert response_json["items"][0]["APPS_NAME"] == "LIBERTY", "Liberty application is not found"
20
- assert response_json["status"] == "success", "Status returned is wrong"
21
-
@@ -1,20 +0,0 @@
1
- import allure
2
-
3
-
4
- TEXT_TO_ENCRYPT = {"plain_text": "admin"}
5
-
6
- @allure.feature("Encryption")
7
- @allure.story("Encrypt a text")
8
-
9
- def test_encrypt_text(client):
10
- """
11
- Test `/api/fmw/encrypt`.
12
- """
13
- with allure.step("Get a encrypted text"):
14
- response = client.post("/api/fmw/encrypt", json=TEXT_TO_ENCRYPT)
15
- allure.attach(response.text, name="Results", attachment_type=allure.attachment_type.JSON)
16
-
17
- with allure.step("Validate response"):
18
- assert response.status_code == 200, "Encrypt request failed"
19
- response_json = response.json()
20
- assert response_json["encrypted"] != "", "Text is empty when it should contain a value"
@@ -1,19 +0,0 @@
1
- import allure
2
-
3
- @allure.feature("Framework")
4
- @allure.story("Get Modules Settings")
5
-
6
- def test_modules(client):
7
- """
8
- Test `/api/fmw/modules``.
9
- """
10
- with allure.step("Get modules settings from /api/fmw/modules"):
11
- response = client.get("/api/fmw/modules")
12
- allure.attach(response.text, name="Results", attachment_type=allure.attachment_type.JSON)
13
-
14
- with allure.step("Validate response"):
15
- assert response.status_code == 200, "Modules request failed"
16
- response_json = response.json()
17
- assert "items" in response_json, "Response does not contain 'items'"
18
- assert response_json["status"] == "success", "Status returned is wrong"
19
- assert response_json["count"] == 6, "Wrong number of modules returned"
@@ -1,26 +0,0 @@
1
- import json
2
- import allure
3
-
4
- THEME_QUERY_PARAMS = {
5
- "pool": "default",
6
- "q": json.dumps({"THM_NAME": {"=": "liberty"}}) # Converts the dictionary into a JSON string
7
- }
8
-
9
- @allure.feature("Framework")
10
- @allure.story("Get Themes Settings")
11
-
12
- def test_themes(client):
13
- """
14
- Test `/api/fmw/themes``.
15
- """
16
- with allure.step("Get themes settings from /api/fmw/themes"):
17
- response = client.get("/api/fmw/themes", params=THEME_QUERY_PARAMS)
18
- allure.attach(response.text, name="Results", attachment_type=allure.attachment_type.JSON)
19
-
20
- with allure.step("Validate response"):
21
- assert response.status_code == 200, "Themes request failed"
22
- response_json = response.json()
23
- assert "items" in response_json, "Response does not contain 'items'"
24
- assert len(response_json["items"]) > 0, "Response 'items' list is empty"
25
- assert response_json["items"][0]["THM_NAME"] == "liberty", "Liberty theme is not found"
26
- assert response_json["status"] == "success", "Status returned is wrong"