Skip to content

Commit

Permalink
Merge pull request #156 from Crown-Commercial-Service/add-route-to-ge…
Browse files Browse the repository at this point in the history
…t-efl-sections

Add the `get_evaluator_framework_lot_section` route
  • Loading branch information
tim-s-ccs authored Nov 25, 2024
2 parents 4a652a4 + 56b4a08 commit e9e367d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dmapiclient/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '29.6.0'
__version__ = '29.7.0'

from .errors import APIError, HTTPError, InvalidResponse # noqa
from .errors import REQUEST_ERROR_STATUS_CODE, REQUEST_ERROR_MESSAGE # noqa
Expand Down
9 changes: 9 additions & 0 deletions dmapiclient/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1769,6 +1769,15 @@ def update_assigned_sections_for_evaluator_framework_lot(
user=user,
)

def get_evaluator_framework_lot_section(
self,
evaluator_framework_lot_section_id,
):
return self._get(
"/evaluations/evaluator-framework-lot-sections/"
f"{evaluator_framework_lot_section_id}"
)

def find_evaluator_framework_lot_section_evaluations(
self,
framework,
Expand Down
11 changes: 11 additions & 0 deletions tests/test_data_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4521,6 +4521,17 @@ def test_update_assigned_sections_for_evaluator_framework_lot(self, data_client,
'updated_by': 'user',
}

def test_get_evaluator_framework_lot_section(self, data_client, rmock):
rmock.get(
"http://baseurl/evaluations/evaluator-framework-lot-sections/1234",
json={"evaluatorFrameworkLotSections": "result"},
status_code=200)

result = data_client.get_evaluator_framework_lot_section(1234)

assert result == {"evaluatorFrameworkLotSections": "result"}
assert rmock.called

def test_find_evaluator_framework_lot_section_evaluations(self, data_client, rmock):
rmock.get(
"http://baseurl/evaluations/evaluator-framework-lot-section-evaluations?"
Expand Down

0 comments on commit e9e367d

Please sign in to comment.