From f8f928accbc6ed44077ea4ba7c18c93511250741 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Tue, 12 Jun 2018 08:23:15 +0100 Subject: [PATCH] Remove keys now at framework top level ## Summary We store key framework lifecycle dates at the top level of the framework record, so these values in the framework.frameworkAgreementDetails are duplicates. Let's consolidate by removing them. ## Ticket https://trello.com/c/82u630c9/80-remove-old-keys-from-frameworkagreementdetails --- CHANGELOG.md | 6 ++++++ dmutils/__init__.py | 2 +- dmutils/api_stubs.py | 2 -- tests/test_api_stubs.py | 6 ------ 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eeb97ba..40f88c7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Records breaking changes from major version bumps +## 39.0.0 + +PR [407](https://github.com/alphagov/digitalmarketplace-utils/pull/407) + +Updated api_stubs.framework_agreement_details, removing keys `frameworkEndDate` and `frameworkStartDate`. Any references to these will need to be removed. + ## 38.0.0 PR [#397](https://github.com/alphagov/digitalmarketplace-utils/pull/397) diff --git a/dmutils/__init__.py b/dmutils/__init__.py index 0da0230b..3cb4386a 100644 --- a/dmutils/__init__.py +++ b/dmutils/__init__.py @@ -4,4 +4,4 @@ import flask_featureflags # noqa -__version__ = '38.3.0' +__version__ = '39.0.0' diff --git a/dmutils/api_stubs.py b/dmutils/api_stubs.py index 84dacd51..292bd5b0 100644 --- a/dmutils/api_stubs.py +++ b/dmutils/api_stubs.py @@ -85,10 +85,8 @@ def framework_agreement_details(slug='g-cloud-7', return { "contractNoticeNumber": "2010/ABC-DEF", "frameworkAgreementVersion": framework_agreement_version, - "frameworkEndDate": "01 January 2001", "frameworkExtensionLength": "12 months", "frameworkRefDate": "29-06-2000", - "frameworkStartDate": "05 January 2000", "frameworkURL": f"https://www.gov.uk/government/publications/{slug}", "lotDescriptions": lot_descriptions, "lotOrder": lot_order, diff --git a/tests/test_api_stubs.py b/tests/test_api_stubs.py index 618d8101..584a0d05 100644 --- a/tests/test_api_stubs.py +++ b/tests/test_api_stubs.py @@ -32,10 +32,8 @@ def test_default_values(self): assert api_stubs.framework_agreement_details() == { "contractNoticeNumber": "2010/ABC-DEF", "frameworkAgreementVersion": "RM1557x", - "frameworkEndDate": "01 January 2001", "frameworkExtensionLength": "12 months", "frameworkRefDate": "29-06-2000", - "frameworkStartDate": "05 January 2000", "frameworkURL": f"https://www.gov.uk/government/publications/g-cloud-7", "lotDescriptions": {}, "lotOrder": [], @@ -50,10 +48,8 @@ def test_override_slug_version_and_variation(self): framework_variations={"1": "blah"}) == { "contractNoticeNumber": "2010/ABC-DEF", "frameworkAgreementVersion": "v0.0.1", - "frameworkEndDate": "01 January 2001", "frameworkExtensionLength": "12 months", "frameworkRefDate": "29-06-2000", - "frameworkStartDate": "05 January 2000", "frameworkURL": f"https://www.gov.uk/government/publications/my-custom-slug", "lotDescriptions": {}, "lotOrder": [], @@ -67,10 +63,8 @@ def test_with_lots(self): assert api_stubs.framework_agreement_details(lots=lots) == { "contractNoticeNumber": "2010/ABC-DEF", "frameworkAgreementVersion": "RM1557x", - "frameworkEndDate": "01 January 2001", "frameworkExtensionLength": "12 months", "frameworkRefDate": "29-06-2000", - "frameworkStartDate": "05 January 2000", "frameworkURL": f"https://www.gov.uk/government/publications/g-cloud-7", "lotDescriptions": {"cloud-hosting": "Lot 1: Cloud hosting", "cloud-support": "Lot 2: Cloud support"},