Skip to content

Commit 000d123

Browse files
committed
reformat: adjust score_execution.py to use same style of internal service call
1 parent d026241 commit 000d123

File tree

2 files changed

+3
-51
lines changed

2 files changed

+3
-51
lines changed

src/sasctl/_services/score_execution.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from requests import HTTPError
44

5-
from .score_definitions import ScoreDefinitions as sd
5+
from .score_definitions import ScoreDefinitions
66
from .service import Service
77

88

@@ -18,6 +18,7 @@ class ScoreExecution(Service):
1818
"""
1919

2020
_SERVICE_ROOT = "/scoreExecution"
21+
_score_definitions = ScoreDefinitions()
2122

2223
(
2324
list_executions,
@@ -57,7 +58,7 @@ def create_score_execution(
5758
"""
5859

5960
# Gets information about the scoring object from the score definition and raises an exception if the score definition does not exist
60-
score_definition = sd.get_definition(score_definition_id)
61+
score_definition = cls._score_definitions.get_definition(score_definition_id)
6162
if score_definition.status_code >= 400:
6263
raise HTTPError(score_definition.json())
6364
score_exec_name = score_definition.get("name")

tests/unit/test_score_executions.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)