Skip to content

Commit

Permalink
Merge pull request #161 from Crown-Commercial-Service/add-with-evalua…
Browse files Browse the repository at this point in the history
…tions-option

Add `with_evaluation` param to route that was missed
  • Loading branch information
tim-s-ccs authored Nov 29, 2024
2 parents 0f8f212 + 2719bb3 commit e7230b4
Show file tree
Hide file tree
Showing 3 changed files with 15 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.11.0'
__version__ = '29.11.1'

from .errors import APIError, HTTPError, InvalidResponse # noqa
from .errors import REQUEST_ERROR_STATUS_CODE, REQUEST_ERROR_MESSAGE # noqa
Expand Down
2 changes: 2 additions & 0 deletions dmapiclient/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,7 @@ def find_evaluator_framework_lot_sections(
assigned=True,
section_slug=None,
locked=None,
with_evaluations=None,
page=None,
):
params = {
Expand All @@ -1765,6 +1766,7 @@ def find_evaluator_framework_lot_sections(
'assigned': bool(assigned),
'section_slug': section_slug,
'locked': locked,
'with_evaluations': with_evaluations,
'page': page
}

Expand Down
12 changes: 12 additions & 0 deletions tests/test_data_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4579,6 +4579,18 @@ def test_find_evaluator_framework_lot_sections_adds_locked_parameter(self, data_
assert result == {"evaluatorFrameworkLotSections": "result"}
assert rmock.called

def test_find_evaluator_framework_lot_sections_adds_with_evaluations_parameter(self, data_client, rmock):
rmock.get(
"http://baseurl/evaluations/evaluator-framework-lot-sections?"
"framework=g-cloud-6&lot=g-things&assigned=True&with_evaluations=True",
json={"evaluatorFrameworkLotSections": "result"},
status_code=200)

result = data_client.find_evaluator_framework_lot_sections('g-cloud-6', 'g-things', with_evaluations=True)

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

def test_update_assigned_sections_for_evaluator_framework_lot(self, data_client, rmock):
rmock.post(
"http://baseurl/evaluations/evaluator-framework-lot-sections",
Expand Down

0 comments on commit e7230b4

Please sign in to comment.