plexus-python-pulse-common 1.1.88__tar.gz → 1.1.89__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.
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/PKG-INFO +1 -1
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/apiutils.py +22 -5
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus_python_pulse_common.egg-info/PKG-INFO +1 -1
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/apiutils_test.py +39 -11
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/ormutils_test.py +3 -3
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/.editorconfig +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/.github/workflows/pr.yml +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/.github/workflows/push.yml +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/.gitignore +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/MANIFEST.in +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/README.md +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/VERSION +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/pyproject.toml +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/jsonutils/dummy.0.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/jsonutils/dummy.1.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/jsonutils/dummy.2.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/0-dummy +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/1-dummy +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/2-dummy +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.0.0.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.0.0.vol-0.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.0.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.1.1.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.1.1.vol-1.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.1.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.2.2.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.2.2.vol-2.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.2.jsonl +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.csv.part0 +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.csv.part1 +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.csv.part2 +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/pathutils/dummy.txt +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils/dir.baz/file.bar.baz +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils/dir.baz/file.foo.bar +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils/dir.baz/file.foo.baz +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils/dir.foo/file.bar +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils/dir.foo/file.baz +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils/dir.foo/file.foo +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils_archive/archive.compressed.zip +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/resources/unittest/s3utils_archive/archive.uncompressed.zip +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/setup.cfg +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/setup.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/__init__.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/carto/OSMFile.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/carto/OSMNode.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/carto/OSMTags.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/carto/OSMWay.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/carto/__init__.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/resources/__init__.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/resources/tags/__init__.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/resources/tags/unittest-1.0.0.tagset.yaml +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/resources/tags/universal-1.0.0.tagset.yaml +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/__init__.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/bagutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/config.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/datautils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/dockerutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/flowutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/gisutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/jsonutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/ormutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/pathutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/s3utils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/sqlutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/strutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/tagutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus/pulse/common/utils/testutils.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus_python_pulse_common.egg-info/SOURCES.txt +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus_python_pulse_common.egg-info/dependency_links.txt +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus_python_pulse_common.egg-info/not-zip-safe +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus_python_pulse_common.egg-info/requires.txt +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/src/plexus_python_pulse_common.egg-info/top_level.txt +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/__init__.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/__init__.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/__init__.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/carto/__init__.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/carto/osm_file_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/carto/osm_tags_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/__init__.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/bagutils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/datautils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/dockerutils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/flowutils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/gisutils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/jsonutils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/pathutils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/s3utils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/strutils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/tagutils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/plexus_tests/pulse/common/utils/testutils_test.py +0 -0
- {plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/test/testenv.py +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from collections.abc import Callable, Mapping
|
|
1
2
|
from contextlib import AbstractContextManager
|
|
2
3
|
|
|
3
4
|
import sqlalchemy.orm as sa_orm
|
|
@@ -5,14 +6,21 @@ from fastapi import HTTPException
|
|
|
5
6
|
from plexus.common.utils import logger
|
|
6
7
|
|
|
7
8
|
__all__ = [
|
|
8
|
-
"
|
|
9
|
+
"database_transaction",
|
|
9
10
|
]
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
class
|
|
13
|
-
def __init__(
|
|
13
|
+
class DBTransactionManager(AbstractContextManager):
|
|
14
|
+
def __init__(
|
|
15
|
+
self,
|
|
16
|
+
db: sa_orm.Session,
|
|
17
|
+
*,
|
|
18
|
+
commit_on_exit: bool,
|
|
19
|
+
redirect: Mapping[type[Exception], Callable[[Exception], HTTPException]] | None = None,
|
|
20
|
+
):
|
|
14
21
|
self.db = db
|
|
15
22
|
self.commit_on_exit = commit_on_exit
|
|
23
|
+
self.redirect = redirect
|
|
16
24
|
|
|
17
25
|
def __enter__(self):
|
|
18
26
|
return self
|
|
@@ -39,9 +47,18 @@ class DBSessionExceptionManager(AbstractContextManager):
|
|
|
39
47
|
if isinstance(exc_value, HTTPException) or not isinstance(exc_value, Exception):
|
|
40
48
|
return
|
|
41
49
|
|
|
50
|
+
for exception_type, make_response in (self.redirect or {}).items():
|
|
51
|
+
if isinstance(exc_value, exception_type):
|
|
52
|
+
raise make_response(exc_value) from exc_value
|
|
53
|
+
|
|
42
54
|
logger.error("Database session failed", exc_info=(type(exc_value), exc_value, exc_value.__traceback__))
|
|
43
55
|
raise HTTPException(status_code=500, detail="Internal server error") from exc_value
|
|
44
56
|
|
|
45
57
|
|
|
46
|
-
def
|
|
47
|
-
|
|
58
|
+
def database_transaction(
|
|
59
|
+
db: sa_orm.Session,
|
|
60
|
+
*,
|
|
61
|
+
commit_on_exit: bool = True,
|
|
62
|
+
redirect: Mapping[type[Exception], Callable[[Exception], HTTPException]] | None = None,
|
|
63
|
+
) -> DBTransactionManager:
|
|
64
|
+
return DBTransactionManager(db, commit_on_exit=commit_on_exit, redirect=redirect)
|
|
@@ -3,30 +3,30 @@ from unittest.mock import Mock, patch
|
|
|
3
3
|
|
|
4
4
|
from fastapi import HTTPException
|
|
5
5
|
|
|
6
|
-
from plexus.pulse.common.utils.apiutils import
|
|
6
|
+
from plexus.pulse.common.utils.apiutils import database_transaction
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ApiUtilsTest(unittest.TestCase):
|
|
10
|
-
def
|
|
10
|
+
def test_database_transaction__success(self):
|
|
11
11
|
for commit_on_exit in (True, False):
|
|
12
12
|
with self.subTest(commit_on_exit=commit_on_exit):
|
|
13
13
|
db = Mock()
|
|
14
|
-
with
|
|
14
|
+
with database_transaction(db, commit_on_exit=commit_on_exit):
|
|
15
15
|
pass
|
|
16
16
|
self.assertEqual(db.commit.call_count, int(commit_on_exit))
|
|
17
17
|
db.rollback.assert_not_called()
|
|
18
18
|
|
|
19
|
-
def
|
|
19
|
+
def test_database_transaction__http_exception(self):
|
|
20
20
|
db = Mock()
|
|
21
21
|
error = HTTPException(404, "Missing", headers={"X-Reason": "missing"})
|
|
22
22
|
with self.assertRaises(HTTPException) as caught:
|
|
23
|
-
with
|
|
23
|
+
with database_transaction(db):
|
|
24
24
|
raise error
|
|
25
25
|
self.assertIs(caught.exception, error)
|
|
26
26
|
db.rollback.assert_called_once_with()
|
|
27
27
|
db.commit.assert_not_called()
|
|
28
28
|
|
|
29
|
-
def
|
|
29
|
+
def test_database_transaction__body_and_commit_errors_are_sanitized(self):
|
|
30
30
|
for during_commit in (False, True):
|
|
31
31
|
with self.subTest(during_commit=during_commit):
|
|
32
32
|
db = Mock()
|
|
@@ -35,7 +35,7 @@ class ApiUtilsTest(unittest.TestCase):
|
|
|
35
35
|
db.commit.side_effect = error
|
|
36
36
|
with patch("plexus.pulse.common.utils.apiutils.logger") as logger:
|
|
37
37
|
with self.assertRaises(HTTPException) as caught:
|
|
38
|
-
with
|
|
38
|
+
with database_transaction(db):
|
|
39
39
|
if not during_commit:
|
|
40
40
|
raise error
|
|
41
41
|
logger.error.assert_called_once()
|
|
@@ -44,7 +44,7 @@ class ApiUtilsTest(unittest.TestCase):
|
|
|
44
44
|
self.assertIs(caught.exception.__cause__, error)
|
|
45
45
|
db.rollback.assert_called_once_with()
|
|
46
46
|
|
|
47
|
-
def
|
|
47
|
+
def test_database_transaction__process_control_exceptions_are_preserved(self):
|
|
48
48
|
for error_type in (KeyboardInterrupt, SystemExit):
|
|
49
49
|
for during_commit in (False, True):
|
|
50
50
|
with self.subTest(error_type=error_type, during_commit=during_commit):
|
|
@@ -53,19 +53,47 @@ class ApiUtilsTest(unittest.TestCase):
|
|
|
53
53
|
if during_commit:
|
|
54
54
|
db.commit.side_effect = error
|
|
55
55
|
with self.assertRaises(error_type) as caught:
|
|
56
|
-
with
|
|
56
|
+
with database_transaction(db):
|
|
57
57
|
if not during_commit:
|
|
58
58
|
raise error
|
|
59
59
|
self.assertIs(caught.exception, error)
|
|
60
60
|
db.rollback.assert_called_once_with()
|
|
61
61
|
|
|
62
|
-
def
|
|
62
|
+
def test_database_transaction__rollback_failure_preserves_original_http_exception(self):
|
|
63
63
|
db = Mock()
|
|
64
64
|
db.rollback.side_effect = RuntimeError("Rollback failed")
|
|
65
65
|
error = HTTPException(409, "Conflict")
|
|
66
66
|
with patch("plexus.pulse.common.utils.apiutils.logger") as logger:
|
|
67
67
|
with self.assertRaises(HTTPException) as caught:
|
|
68
|
-
with
|
|
68
|
+
with database_transaction(db):
|
|
69
69
|
raise error
|
|
70
70
|
logger.exception.assert_called_once()
|
|
71
71
|
self.assertIs(caught.exception, error)
|
|
72
|
+
|
|
73
|
+
def test_database_transaction__redirects_body_and_commit_errors(self):
|
|
74
|
+
for during_commit in (False, True):
|
|
75
|
+
with self.subTest(during_commit=during_commit):
|
|
76
|
+
db = Mock()
|
|
77
|
+
error = ValueError("invalid value")
|
|
78
|
+
response = HTTPException(422, "Invalid value")
|
|
79
|
+
make_response = Mock(return_value=response)
|
|
80
|
+
if during_commit:
|
|
81
|
+
db.commit.side_effect = error
|
|
82
|
+
with self.assertRaises(HTTPException) as caught:
|
|
83
|
+
with database_transaction(db, redirect={ValueError: make_response}):
|
|
84
|
+
if not during_commit:
|
|
85
|
+
raise error
|
|
86
|
+
self.assertIs(caught.exception, response)
|
|
87
|
+
self.assertIs(caught.exception.__cause__, error)
|
|
88
|
+
make_response.assert_called_once_with(error)
|
|
89
|
+
db.rollback.assert_called_once_with()
|
|
90
|
+
|
|
91
|
+
def test_database_transaction__http_exception_skips_redirect(self):
|
|
92
|
+
db = Mock()
|
|
93
|
+
error = HTTPException(404, "Missing")
|
|
94
|
+
make_response = Mock()
|
|
95
|
+
with self.assertRaises(HTTPException) as caught:
|
|
96
|
+
with database_transaction(db, redirect={Exception: make_response}):
|
|
97
|
+
raise error
|
|
98
|
+
self.assertIs(caught.exception, error)
|
|
99
|
+
make_response.assert_not_called()
|
|
@@ -15,7 +15,7 @@ from plexus.common.utils.jsonutils import JsonType
|
|
|
15
15
|
from plexus.common.utils.randutils import randomizer
|
|
16
16
|
from sqlmodel import Field, SQLModel
|
|
17
17
|
|
|
18
|
-
from plexus.pulse.common.utils.apiutils import
|
|
18
|
+
from plexus.pulse.common.utils.apiutils import database_transaction
|
|
19
19
|
from plexus.pulse.common.utils.ormutils import (
|
|
20
20
|
changing_model_mixin,
|
|
21
21
|
make_base_model,
|
|
@@ -1085,7 +1085,7 @@ def test_make_snapshot_model_trigger(fixture_postgresql_test_proc, fixture_postg
|
|
|
1085
1085
|
dummy_json=rng.random_json_object(5),
|
|
1086
1086
|
)
|
|
1087
1087
|
|
|
1088
|
-
with maker.make_session() as session,
|
|
1088
|
+
with maker.make_session() as session, database_transaction(session):
|
|
1089
1089
|
session.execute(sa.sql.text("SET TIMEZONE TO 'UTC'"))
|
|
1090
1090
|
session.commit()
|
|
1091
1091
|
|
|
@@ -1171,7 +1171,7 @@ def test_make_revision_model_trigger(fixture_postgresql_test_proc, fixture_postg
|
|
|
1171
1171
|
dummy_json=rng.random_json_object(5),
|
|
1172
1172
|
)
|
|
1173
1173
|
|
|
1174
|
-
with maker.make_session() as session,
|
|
1174
|
+
with maker.make_session() as session, database_transaction(session):
|
|
1175
1175
|
session.execute(sa.sql.text("SET TIMEZONE TO 'UTC'"))
|
|
1176
1176
|
session.commit()
|
|
1177
1177
|
|
|
File without changes
|
{plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/.github/workflows/pr.yml
RENAMED
|
File without changes
|
{plexus_python_pulse_common-1.1.88 → plexus_python_pulse_common-1.1.89}/.github/workflows/push.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|