Skip to content
Snippets Groups Projects
Unverified Commit ac7a5a3f authored by samueltwum1's avatar samueltwum1
Browse files

SAR-149 update pipfile to include skuid

parent c18d3061
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ sphinx_rtd_theme = "*"
sphinx-autobuild = "*"
sphinxcontrib-websupport = "*"
recommonmark = "*"
skuid = {editable = true, ref = "SAR-147_add_txn_id_endpoint", git = "https://gitlab.com/ska-telescope/skuid.git"}
[dev-packages]
......
......@@ -7,7 +7,7 @@ import os
from typing import Mapping, Text
from skuid.client import SkuidClient, get_local_transaction_id
from ska.skuid.client import SkuidClient, get_local_transaction_id
class transaction:
"""Transaction context handler.
......@@ -48,7 +48,8 @@ class transaction:
def __exit__(self, exc_type, exc_val, exc_tb):
# TODO: more to be done with func arguments
transaction_id = self._get_new_or_existing_transaction_id()
params_json = json.dumps(self._params)
self.logger.info(f"Exit transaction {self._name}, {transaction_id}, {params_json}")
def _get_new_or_existing_transaction_id(self):
......
......@@ -95,7 +95,7 @@ class TestTransactionIdGenerator:
def test_remote_id_generator_increments_on_next(self, monkeypatch):
monkeypatch.setenv("SKUID_URL", "endpoint/to/skuid-client")
with patch("skuid.client.requests.get") as mocked_req:
with patch("ska.skuid.client.requests.get") as mocked_req:
response = MagicMock()
response.json.side_effect = [
json.dumps({"transaction_id": 1}),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment