sefrone-api-e2e 1.0.4__tar.gz → 1.0.5__tar.gz
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.
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/PKG-INFO +1 -1
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/sefrone_api_e2e/api_e2e_manager.py +12 -3
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/sefrone_api_e2e.egg-info/PKG-INFO +1 -1
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/setup.py +1 -1
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/README.md +0 -0
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/sefrone_api_e2e/__init__.py +0 -0
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/sefrone_api_e2e/email_mock_server.py +0 -0
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/sefrone_api_e2e/json_mock_server.py +0 -0
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/sefrone_api_e2e.egg-info/SOURCES.txt +0 -0
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/sefrone_api_e2e.egg-info/dependency_links.txt +0 -0
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/sefrone_api_e2e.egg-info/requires.txt +0 -0
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/sefrone_api_e2e.egg-info/top_level.txt +0 -0
- {sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/setup.cfg +0 -0
|
@@ -129,15 +129,24 @@ class ApiE2ETestsManager:
|
|
|
129
129
|
|
|
130
130
|
@staticmethod
|
|
131
131
|
def check_type(value, expected_type):
|
|
132
|
+
# Check for nullable type (e.g., "string?", "number?")
|
|
133
|
+
is_nullable = expected_type.endswith("?")
|
|
134
|
+
if is_nullable:
|
|
135
|
+
base_type = expected_type[:-1]
|
|
136
|
+
if value is None:
|
|
137
|
+
return True
|
|
138
|
+
else:
|
|
139
|
+
base_type = expected_type
|
|
140
|
+
|
|
132
141
|
type_map = {
|
|
133
142
|
"string": str,
|
|
134
143
|
"number": (int, float),
|
|
135
144
|
"boolean": bool,
|
|
136
145
|
"datetime": str
|
|
137
146
|
}
|
|
138
|
-
if
|
|
147
|
+
if base_type not in type_map:
|
|
139
148
|
raise ValueError(f"Unknown type in YAML: {expected_type}")
|
|
140
|
-
if
|
|
149
|
+
if base_type == "datetime":
|
|
141
150
|
try:
|
|
142
151
|
datetime.datetime.fromisoformat(value)
|
|
143
152
|
return True
|
|
@@ -148,7 +157,7 @@ class ApiE2ETestsManager:
|
|
|
148
157
|
return True
|
|
149
158
|
except Exception:
|
|
150
159
|
return False
|
|
151
|
-
return isinstance(value, type_map[
|
|
160
|
+
return isinstance(value, type_map[base_type])
|
|
152
161
|
|
|
153
162
|
@staticmethod
|
|
154
163
|
def validate_structure(data, expected):
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="sefrone_api_e2e",
|
|
8
|
-
version="1.0.
|
|
8
|
+
version="1.0.5",
|
|
9
9
|
author="Sefrone",
|
|
10
10
|
author_email="contact@sefrone.com",
|
|
11
11
|
description="A Python package to provide e2e testing helpers for sefrone API projects",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sefrone_api_e2e-1.0.4 → sefrone_api_e2e-1.0.5}/sefrone_api_e2e.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|