pytestomatio 2.8.2.dev20__tar.gz → 2.8.2.dev21__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.
- {pytestomatio-2.8.2.dev20/pytestomatio.egg-info → pytestomatio-2.8.2.dev21}/PKG-INFO +1 -1
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pyproject.toml +1 -1
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/connect/connector.py +16 -18
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21/pytestomatio.egg-info}/PKG-INFO +1 -1
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/LICENSE +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/README.md +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/__init__.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/connect/__init__.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/connect/s3_connector.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/decor/__init__.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/decor/decorator_updater.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/decor/default.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/decor/pep8.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/main.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/testing/__init__.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/testing/code_collector.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/testing/testItem.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/testomatio/__init__.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/testomatio/testRunConfig.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/testomatio/testomat_item.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/testomatio/testomatio.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/utils/__init__.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/utils/helper.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/utils/parser_setup.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/utils/validations.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio.egg-info/SOURCES.txt +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio.egg-info/dependency_links.txt +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio.egg-info/entry_points.txt +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio.egg-info/requires.txt +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio.egg-info/top_level.txt +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/setup.cfg +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/tests/sub/__init__.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/tests/sub/sub_mob/__init__.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/tests/sub/sub_mob/sub_sub_class_test.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/tests/sub/sub_mob/sub_sub_test.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/tests/sub/test_class_sub.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/tests/sub/test_sub.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/tests/test_class_root.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/tests/test_decorators.py +0 -0
- {pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/tests/test_root.py +0 -0
|
@@ -12,27 +12,25 @@ log = logging.getLogger('pytestomatio')
|
|
|
12
12
|
class Connector:
|
|
13
13
|
def __init__(self, base_url: str = 'https://app.testomat.io', api_key: str = None):
|
|
14
14
|
self.base_url = base_url
|
|
15
|
-
self.
|
|
16
|
-
self.session.verify = True
|
|
15
|
+
self._session = requests.Session()
|
|
17
16
|
self.jwt: str = ''
|
|
18
17
|
self.api_key = api_key
|
|
19
|
-
self.proxies = {}
|
|
20
18
|
|
|
21
19
|
@property
|
|
22
|
-
def
|
|
20
|
+
def _session(self):
|
|
23
21
|
"""Resolve and apply proxy settings each time session is accessed."""
|
|
24
|
-
if self.
|
|
25
|
-
self.
|
|
22
|
+
if self._session is None:
|
|
23
|
+
self._session = requests.Session()
|
|
26
24
|
|
|
27
25
|
http_proxy = getenv("HTTP_PROXY")
|
|
28
26
|
if http_proxy:
|
|
29
|
-
self.
|
|
30
|
-
self.
|
|
27
|
+
self._session.proxies = {"http": http_proxy, "https": http_proxy}
|
|
28
|
+
self._session.verify = False
|
|
31
29
|
else:
|
|
32
|
-
self.
|
|
33
|
-
self.
|
|
30
|
+
self._session.proxies.clear()
|
|
31
|
+
self._session.verify = True
|
|
34
32
|
|
|
35
|
-
return self.
|
|
33
|
+
return self._session
|
|
36
34
|
|
|
37
35
|
def load_tests(
|
|
38
36
|
self,
|
|
@@ -66,7 +64,7 @@ class Connector:
|
|
|
66
64
|
})
|
|
67
65
|
|
|
68
66
|
try:
|
|
69
|
-
response = self.
|
|
67
|
+
response = self._session.post(f'{self.base_url}/api/load?api_key={self.api_key}', json=request)
|
|
70
68
|
except ConnectionError:
|
|
71
69
|
log.error(f'Failed to connect to {self.base_url}')
|
|
72
70
|
return
|
|
@@ -84,7 +82,7 @@ class Connector:
|
|
|
84
82
|
|
|
85
83
|
def get_tests(self, test_metadata: list[TestItem]) -> dict:
|
|
86
84
|
# with safe_request('Failed to get test ids from testomat.io'):
|
|
87
|
-
response = self.
|
|
85
|
+
response = self._session.get(f'{self.base_url}/api/test_data?api_key={self.api_key}')
|
|
88
86
|
return response.json()
|
|
89
87
|
|
|
90
88
|
def create_test_run(self, title: str, group_title, env: str, label: str, shared_run: bool, parallel, ci_build_url: str) -> dict | None:
|
|
@@ -100,7 +98,7 @@ class Connector:
|
|
|
100
98
|
}
|
|
101
99
|
filtered_request = {k: v for k, v in request.items() if v is not None}
|
|
102
100
|
try:
|
|
103
|
-
response = self.
|
|
101
|
+
response = self._session.post(f'{self.base_url}/api/reporter', json=filtered_request)
|
|
104
102
|
except ConnectionError:
|
|
105
103
|
log.error(f'Failed to connect to {self.base_url}')
|
|
106
104
|
return
|
|
@@ -130,7 +128,7 @@ class Connector:
|
|
|
130
128
|
filtered_request = {k: v for k, v in request.items() if v is not None}
|
|
131
129
|
|
|
132
130
|
try:
|
|
133
|
-
response = self.
|
|
131
|
+
response = self._session.put(f'{self.base_url}/api/reporter/{id}', json=filtered_request)
|
|
134
132
|
except ConnectionError as ce:
|
|
135
133
|
log.error(f'Failed to connect to {self.base_url}: {ce}')
|
|
136
134
|
return
|
|
@@ -175,7 +173,7 @@ class Connector:
|
|
|
175
173
|
}
|
|
176
174
|
filtered_request = {k: v for k, v in request.items() if v is not None}
|
|
177
175
|
try:
|
|
178
|
-
response = self.
|
|
176
|
+
response = self._session.post(f'{self.base_url}/api/reporter/{run_id}/testrun?api_key={self.api_key}',
|
|
179
177
|
json=filtered_request)
|
|
180
178
|
except ConnectionError:
|
|
181
179
|
log.error(f'Failed to connect to {self.base_url}')
|
|
@@ -193,7 +191,7 @@ class Connector:
|
|
|
193
191
|
def finish_test_run(self, run_id: str, is_final=False) -> None:
|
|
194
192
|
status_event = 'finish_parallel' if is_final else 'finish'
|
|
195
193
|
try:
|
|
196
|
-
self.
|
|
194
|
+
self._session.put(f'{self.base_url}/api/reporter/{run_id}?api_key={self.api_key}',
|
|
197
195
|
json={"status_event": status_event})
|
|
198
196
|
except ConnectionError:
|
|
199
197
|
log.error(f'Failed to connect to {self.base_url}')
|
|
@@ -206,4 +204,4 @@ class Connector:
|
|
|
206
204
|
return
|
|
207
205
|
|
|
208
206
|
def disconnect(self):
|
|
209
|
-
self.
|
|
207
|
+
self._session.close()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/decor/decorator_updater.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/testing/code_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/testomatio/testRunConfig.py
RENAMED
|
File without changes
|
{pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio/testomatio/testomat_item.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/pytestomatio.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytestomatio-2.8.2.dev20 → pytestomatio-2.8.2.dev21}/tests/sub/sub_mob/sub_sub_class_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|