diff --git a/app/blueprints/fund_builder/forms/round.py b/app/blueprints/fund_builder/forms/round.py index 5b60594b..99b6d8e2 100644 --- a/app/blueprints/fund_builder/forms/round.py +++ b/app/blueprints/fund_builder/forms/round.py @@ -110,5 +110,7 @@ class RoundForm(FlaskForm): mark_as_complete_enabled = RadioField(choices=[("true", "Yes"), ("false", "No")], default="false") is_expression_of_interest = RadioField(choices=[("true", "Yes"), ("false", "No")], default="false") feedback_survey_config = TextAreaField("Feedback Survey") - eligibility_config = TextAreaField("Eligibility config") + eligibility_config = RadioField( + "Has eligibility config", choices=[("true", "Yes"), ("false", "No")], default="false" + ) eoi_decision_schema = TextAreaField("EOI Decision schema") diff --git a/app/blueprints/fund_builder/routes.py b/app/blueprints/fund_builder/routes.py index a23d2648..e5b437c1 100644 --- a/app/blueprints/fund_builder/routes.py +++ b/app/blueprints/fund_builder/routes.py @@ -324,8 +324,12 @@ def populate_form_with_round_data(round): "mark_as_complete_enabled": "true" if round.mark_as_complete_enabled else "false", "is_expression_of_interest": "true" if round.is_expression_of_interest else "false", "feedback_survey_config": round.feedback_survey_config, - "eligibility_config": round.eligibility_config.get("has_eligibility", "false"), - "eoi_decision_schema": round.eoi_decision_schema.get("en", ""), + "eligibility_config": ( + "true" + if round.eligibility_config and round.eligibility_config.get("has_eligibility", "") == "true" + else "false" + ), + "eoi_decision_schema": round.eoi_decision_schema.get("en", "") if round.eoi_decision_schema else "", } return RoundForm(data=round_data) @@ -337,14 +341,8 @@ def update_existing_round(round, form): :param Round round: The round object to update :param RoundForm form: The form with the new round data """ - round.title_json["en"] = form.title_en.data + round.title_json = {"en": form.title_en.data if form.title_en.data else ""} round.short_name = form.short_name.data - round.contact_us_banner_json["en"] = form.contact_us_banner_json.data - round.instructions_json["en"] = form.instructions_json.data - round.application_guidance_json["en"] = form.application_guidance_json.data - round.feedback_survey_config = form.feedback_survey_config.data - round.eligibility_config["has_eligibility"] = form.eligibility_config.data - round.eoi_decision_schema["en"] = form.eoi_decision_schema.data round.opens = get_datetime(form.opens) round.deadline = get_datetime(form.deadline) round.assessment_start = get_datetime(form.assessment_start) @@ -366,6 +364,27 @@ def update_existing_round(round, form): round.display_logo_on_pdf_exports = form.display_logo_on_pdf_exports.data == "true" round.mark_as_complete_enabled = form.mark_as_complete_enabled.data == "true" round.is_expression_of_interest = form.is_expression_of_interest.data == "true" + round.short_name = form.short_name.data + round.contact_us_banner_json = { + "en": form.contact_us_banner_json.data if form.contact_us_banner_json.data else "", + "cy": "", + } + round.instructions_json = {"en": form.instructions_json.data if form.instructions_json.data else "", "cy": ""} + round.application_guidance_json = { + "en": form.application_guidance_json.data if form.application_guidance_json.data else "", + "cy": "", + } + round.guidance_url = form.guidance_url.data + round.all_uploaded_documents_section_available = form.all_uploaded_documents_section_available.data == "true" + round.application_fields_download_available = form.application_fields_download_available.data == "true" + round.display_logo_on_pdf_exports = form.display_logo_on_pdf_exports.data == "true" + round.mark_as_complete_enabled = form.mark_as_complete_enabled.data == "true" + round.is_expression_of_interest = form.is_expression_of_interest.data == "true" + round.feedback_survey_config = ( + json.loads(form.feedback_survey_config.data) if form.feedback_survey_config.data else {} + ) + round.eligibility_config = {"has_eligibility": form.eligibility_config.data == "true"} + round.eoi_decision_schema = {"en": form.eoi_decision_schema.data, "cy": ""} round.audit_info = {"user": "dummy_user", "timestamp": datetime.now().isoformat(), "action": "update"} update_round(round) @@ -406,7 +425,7 @@ def create_new_round(form): mark_as_complete_enabled=form.mark_as_complete_enabled.data == "true", is_expression_of_interest=form.is_expression_of_interest.data == "true", feedback_survey_config=form.feedback_survey_config.data, - eligibility_config={"has_eligibility": form.eligibility_config.data}, + eligibility_config={"has_eligibility": form.eligibility_config.data == "true"}, eoi_decision_schema={"en": form.eoi_decision_schema.data, "cy": None}, ) add_round(new_round) diff --git a/app/blueprints/fund_builder/templates/fund_config.html b/app/blueprints/fund_builder/templates/fund_config.html index fe4bb9d1..f1db988f 100644 --- a/app/blueprints/fund_builder/templates/fund_config.html +++ b/app/blueprints/fund_builder/templates/fund_config.html @@ -157,7 +157,7 @@

Application Rounds

"text": "Contact us banner json" }, "value": { - "text": round.contact_us_banner_json + "text": round.contact_us_banner_json["en"] }, }, { @@ -213,7 +213,7 @@

Application Rounds

"text": "Instructions json" }, "value": { - "text": round.instructions_json + "text": round.instructions_json["en"] }, }, { @@ -237,7 +237,7 @@

Application Rounds

"text": "Application Guidance json" }, "value": { - "text": round.application_guidance_json + "text": round.application_guidance_json["en"] }, }, { @@ -293,7 +293,7 @@

Application Rounds

"text": "Eligibility config" }, "value": { - "text": round.eligibility_config + "text": True if round.eligibility_config["has_eligibility"] == "true" else False }, }, { @@ -301,7 +301,7 @@

Application Rounds

"text": "EOI decision schema" }, "value": { - "text": round.eoi_decision_schema + "text": round.eoi_decision_schema["en"] }, }, diff --git a/app/blueprints/fund_builder/templates/round.html b/app/blueprints/fund_builder/templates/round.html index 26ca0dab..addeb6cf 100644 --- a/app/blueprints/fund_builder/templates/round.html +++ b/app/blueprints/fund_builder/templates/round.html @@ -51,7 +51,7 @@

{{ pageHeading }}

{{ yes_no(form.mark_as_complete_enabled) }} {{ yes_no(form.is_expression_of_interest) }} {{ multilineinput(form.feedback_survey_config) }} - {{ multilineinput(form.eligibility_config) }} + {{ yes_no(form.eligibility_config) }} {{ multilineinput(form.eoi_decision_schema) }} {{ govukButton({ "text": "Save" diff --git a/app/db/migrations/versions/~2024_10_08_1656-8d6f8ec14e53_.py b/app/db/migrations/versions/~2024_10_08_1656-8d6f8ec14e53_.py new file mode 100644 index 00000000..025e644a --- /dev/null +++ b/app/db/migrations/versions/~2024_10_08_1656-8d6f8ec14e53_.py @@ -0,0 +1,110 @@ +"""empty message + +Revision ID: 8d6f8ec14e53 +Revises: 5e2362840f43 +Create Date: 2024-10-08 16:56:32.064596 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '8d6f8ec14e53' +down_revision = '5e2362840f43' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('round', schema=None) as batch_op: + batch_op.alter_column('application_reminder_sent', + existing_type=sa.BOOLEAN(), + server_default=None, + existing_nullable=False) + batch_op.alter_column('reference_contact_page_over_email', + existing_type=sa.BOOLEAN(), + server_default=None, + existing_nullable=False) + batch_op.alter_column('support_times', + existing_type=sa.VARCHAR(), + server_default=None, + existing_nullable=False) + batch_op.alter_column('support_days', + existing_type=sa.VARCHAR(), + server_default=None, + existing_nullable=False) + batch_op.alter_column('project_name_field_id', + existing_type=sa.VARCHAR(), + server_default=None, + existing_nullable=False) + batch_op.alter_column('all_uploaded_documents_section_available', + existing_type=sa.BOOLEAN(), + server_default=None, + existing_nullable=False) + batch_op.alter_column('application_fields_download_available', + existing_type=sa.BOOLEAN(), + server_default=None, + existing_nullable=False) + batch_op.alter_column('display_logo_on_pdf_exports', + existing_type=sa.BOOLEAN(), + server_default=None, + existing_nullable=False) + batch_op.alter_column('mark_as_complete_enabled', + existing_type=sa.BOOLEAN(), + server_default=None, + existing_nullable=False) + batch_op.alter_column('is_expression_of_interest', + existing_type=sa.BOOLEAN(), + server_default=None, + existing_nullable=False) + + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('round', schema=None) as batch_op: + batch_op.alter_column('is_expression_of_interest', + existing_type=sa.BOOLEAN(), + server_default=sa.text('false'), + existing_nullable=False) + batch_op.alter_column('mark_as_complete_enabled', + existing_type=sa.BOOLEAN(), + server_default=sa.text('false'), + existing_nullable=False) + batch_op.alter_column('display_logo_on_pdf_exports', + existing_type=sa.BOOLEAN(), + server_default=sa.text('false'), + existing_nullable=False) + batch_op.alter_column('application_fields_download_available', + existing_type=sa.BOOLEAN(), + server_default=sa.text('false'), + existing_nullable=False) + batch_op.alter_column('all_uploaded_documents_section_available', + existing_type=sa.BOOLEAN(), + server_default=sa.text('false'), + existing_nullable=False) + batch_op.alter_column('project_name_field_id', + existing_type=sa.VARCHAR(), + server_default=sa.text("''::character varying"), + existing_nullable=False) + batch_op.alter_column('support_days', + existing_type=sa.VARCHAR(), + server_default=sa.text("''::character varying"), + existing_nullable=False) + batch_op.alter_column('support_times', + existing_type=sa.VARCHAR(), + server_default=sa.text("''::character varying"), + existing_nullable=False) + batch_op.alter_column('reference_contact_page_over_email', + existing_type=sa.BOOLEAN(), + server_default=sa.text('false'), + existing_nullable=False) + batch_op.alter_column('application_reminder_sent', + existing_type=sa.BOOLEAN(), + server_default=sa.text('false'), + existing_nullable=False) + + # ### end Alembic commands ### diff --git a/app/db/models/round.py b/app/db/models/round.py index c31db495..bd0ff723 100644 --- a/app/db/models/round.py +++ b/app/db/models/round.py @@ -10,7 +10,6 @@ from sqlalchemy import inspect from sqlalchemy.dialects.postgresql import JSON from sqlalchemy.dialects.postgresql import UUID -from sqlalchemy.ext.mutable import MutableDict from sqlalchemy.ext.orderinglist import ordering_list from sqlalchemy.orm import Mapped from sqlalchemy.orm import relationship @@ -37,7 +36,7 @@ class Round(BaseModel): ForeignKey("fund.fund_id"), nullable=False, ) - title_json = Column(MutableDict.as_mutable(JSON(none_as_null=True)), nullable=False, unique=False) + title_json = Column(JSON(none_as_null=True), nullable=False, unique=False) short_name = Column(db.String(), nullable=False, unique=False) opens = Column(DateTime()) deadline = Column(DateTime()) @@ -59,17 +58,17 @@ class Round(BaseModel): criteria: Mapped[list["Criteria"]] = relationship("Criteria") # several other fields to add application_reminder_sent = Column(Boolean, default=False, nullable=False) - contact_us_banner_json = Column(MutableDict.as_mutable(JSON(none_as_null=True)), nullable=True, unique=False) + contact_us_banner_json = Column(JSON(none_as_null=True), nullable=True, unique=False) reference_contact_page_over_email = Column(Boolean, default=False, nullable=False) contact_email = Column(db.String(), nullable=True, unique=False) contact_phone = Column(db.String(), nullable=True, unique=False) contact_textphone = Column(db.String(), nullable=True, unique=False) support_times = Column(db.String(), nullable=False, unique=False) support_days = Column(db.String(), nullable=False, unique=False) - instructions_json = Column(MutableDict.as_mutable(JSON(none_as_null=True)), nullable=True, unique=False) + instructions_json = Column(JSON(none_as_null=True), nullable=True, unique=False) feedback_link = Column(db.String(), unique=False) project_name_field_id = Column(db.String(), unique=False, nullable=False) - application_guidance_json = Column(MutableDict.as_mutable(JSON(none_as_null=True)), nullable=True, unique=False) + application_guidance_json = Column(JSON(none_as_null=True), nullable=True, unique=False) guidance_url = Column(db.String(), nullable=True, unique=False) all_uploaded_documents_section_available = Column(Boolean, default=False, nullable=False) application_fields_download_available = Column(Boolean, default=False, nullable=False) @@ -77,7 +76,7 @@ class Round(BaseModel): mark_as_complete_enabled = Column(Boolean, default=False, nullable=False) is_expression_of_interest = Column(Boolean, default=False, nullable=False) feedback_survey_config = Column(JSON(none_as_null=True), nullable=True, unique=False) - eligibility_config = Column(MutableDict.as_mutable(JSON(none_as_null=True)), nullable=True, unique=False) + eligibility_config = Column(JSON(none_as_null=True), nullable=True, unique=False) eoi_decision_schema = Column(JSON(none_as_null=True), nullable=True, unique=False) def __repr__(self): diff --git a/app/templates/macros/wtfToGovUk.html b/app/templates/macros/wtfToGovUk.html index ec079692..d3e2d0c7 100644 --- a/app/templates/macros/wtfToGovUk.html +++ b/app/templates/macros/wtfToGovUk.html @@ -26,7 +26,7 @@ }, "id": form_field.id, "name": form_field.name , -"value": form_field.data, +"value": form_field.data if form_field.data else "", "errorMessage": {"text": form_field.errors[0]} if (form_field.errors | length > 0) else None, "hint":{"text":form_field.description} }) }} diff --git a/config/envs/development.py b/config/envs/development.py index ac75f015..5970474b 100644 --- a/config/envs/development.py +++ b/config/envs/development.py @@ -14,5 +14,5 @@ class DevelopmentConfig(Config): SQLALCHEMY_DATABASE_URI = getenv( "DATABASE_URL", - "postgresql://postgres:password@fab-db:5432/fab", # pragma: allowlist secret + "postgresql://postgres:password@fab-db:5435/fund_builder", # pragma: allowlist secret ) diff --git a/config/envs/unit_test.py b/config/envs/unit_test.py index 911bdcc3..9126f098 100644 --- a/config/envs/unit_test.py +++ b/config/envs/unit_test.py @@ -16,5 +16,5 @@ class UnitTestConfig(Config): SQLALCHEMY_DATABASE_URI = getenv( "DATABASE_URL_UNIT_TEST", - "postgresql://postgres:postgres@127.0.0.1:5432/fab_unit_test", # pragma: allowlist secret + "postgresql://postgres:password@localhost:5435/fund_builder", # pragma: allowlist secret ) diff --git a/tasks/db_tasks.py b/tasks/db_tasks.py index 7a80d199..2b3998e6 100644 --- a/tasks/db_tasks.py +++ b/tasks/db_tasks.py @@ -2,14 +2,15 @@ import sys from os import getenv -from flask_migrate import upgrade -from invoke import task # noqa:E402 +sys.path.insert(1, ".") -from app import app -from app.import_config.load_form_json import load_form_jsons +os.environ.update({"FLASK_ENV": "development"}) -sys.path.insert(1, ".") -os.environ.update({"FLASK_ENV": "tasks"}) +from flask_migrate import upgrade # noqa: E402 +from invoke import task # noqa:E402 + +from app import app # noqa: E402 +from app.import_config.load_form_json import load_form_jsons # noqa: E402 from .test_data import init_salmon_fishing_fund # noqa:E402 from .test_data import insert_test_data # noqa:E402 diff --git a/tasks/test_data.py b/tasks/test_data.py index 7c51447c..b9dfedd6 100644 --- a/tasks/test_data.py +++ b/tasks/test_data.py @@ -25,13 +25,21 @@ BASIC_ROUND_INFO = { "audit_info": {"user": "dummy_user", "timestamp": datetime.now().isoformat(), "action": "create"}, "title_json": {"en": "round the first"}, - "opens": datetime.now(), - "deadline": datetime.now(), - "assessment_start": datetime.now(), - "reminder_date": datetime.now(), - "assessment_deadline": datetime.now(), + "opens": datetime.now().strftime("%m-%d-%Y %H:%M"), + "deadline": datetime.now().strftime("%m-%d-%Y %H:%M"), + "assessment_start": datetime.now().strftime("%m-%d-%Y %H:%M"), + "reminder_date": datetime.now().strftime("%m-%d-%Y %H:%M"), + "assessment_deadline": datetime.now().strftime("%m-%d-%Y %H:%M"), "prospectus_link": "http://www.google.com", "privacy_notice_link": "http://www.google.com", + "contact_email": "test@test.com", + "contact_phone": "0123334444", + "contact_textphone": "0123334444", + "support_times": "9am to 5pm", + "support_days": "Monday to Friday", + "feedback_link": "http://www.google.com", + "project_name_field_id": "12312312312", + "guidance_url": "http://www.google.com", } page_one_id = uuid4() @@ -70,13 +78,29 @@ def init_salmon_fishing_fund(): audit_info={"user": "dummy_user", "timestamp": datetime.now().isoformat(), "action": "create"}, title_json={"en": "round the first"}, short_name="TEST", - opens=datetime.now(), - deadline=datetime.now(), - assessment_start=datetime.now(), - reminder_date=datetime.now(), - assessment_deadline=datetime.now(), + opens=datetime.now().strftime("%m-%d-%Y %H:%M"), + deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_start=datetime.now().strftime("%m-%d-%Y %H:%M"), + reminder_date=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), prospectus_link="http://www.google.com", privacy_notice_link="http://www.google.com", + application_reminder_sent=False, + reference_contact_page_over_email=False, + contact_email="test@test.com", + contact_phone="0123334444", + contact_textphone="0123334444", + support_times="9am to 5pm", + support_days="Monday to Friday", + instructions_json={"en": "", "cy": ""}, + feedback_link="http://www.google.com", + project_name_field_id="12312312312", + guidance_url="http://www.google.com", + all_uploaded_documents_section_available=False, + application_fields_download_available=False, + display_logo_on_pdf_exports=False, + mark_as_complete_enabled=False, + is_expression_of_interest=False, ) r2: Round = Round( round_id=uuid4(), @@ -84,13 +108,28 @@ def init_salmon_fishing_fund(): audit_info={"user": "dummy_user", "timestamp": datetime.now().isoformat(), "action": "create"}, title_json={"en": "round the second"}, short_name=f"R{randint(0,999)}", - opens=datetime.now(), - deadline=datetime.now(), - assessment_start=datetime.now(), - reminder_date=datetime.now(), - assessment_deadline=datetime.now(), + opens=datetime.now().strftime("%m-%d-%Y %H:%M"), + deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_start=datetime.now().strftime("%m-%d-%Y %H:%M"), + reminder_date=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), prospectus_link="http://www.google.com", privacy_notice_link="http://www.google.com", + application_reminder_sent=False, + reference_contact_page_over_email=False, + contact_email="test@test.com", + contact_phone="0123334444", + contact_textphone="0123334444", + support_times="9am to 5pm", + support_days="Monday to Friday", + feedback_link="http://www.google.com", + project_name_field_id="12312312312", + guidance_url="http://www.google.com", + all_uploaded_documents_section_available=False, + application_fields_download_available=False, + display_logo_on_pdf_exports=False, + mark_as_complete_enabled=False, + is_expression_of_interest=False, ) s1: Section = Section( @@ -314,13 +353,21 @@ def init_unit_test_data() -> dict: audit_info={"user": "dummy_user", "timestamp": datetime.now().isoformat(), "action": "create"}, title_json={"en": "round the first"}, short_name=f"UTR{randint(0,999)}", - opens=datetime.now(), - deadline=datetime.now(), - assessment_start=datetime.now(), - reminder_date=datetime.now(), - assessment_deadline=datetime.now(), + opens=datetime.now().strftime("%m-%d-%Y %H:%M"), + deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_start=datetime.now().strftime("%m-%d-%Y %H:%M"), + reminder_date=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), prospectus_link="http://www.google.com", privacy_notice_link="http://www.google.com", + contact_email="test@test.com", + contact_phone="0123334444", + contact_textphone="0123334444", + support_times="9am to 5pm", + support_days="Monday to Friday", + feedback_link="http://www.google.com", + project_name_field_id="12312312312", + guidance_url="http://www.google.com", ) # r2: Round = Round( # round_id=uuid4(), diff --git a/tests/helpers.py b/tests/helpers.py index e3a8479e..58379d5b 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -91,11 +91,11 @@ def create_test_round(flask_test_client, fund): fund_id=fund.fund_id, title_json={"en": "Test Round"}, short_name=f"R{uuid4().hex[:8]}", - opens=datetime.now(), - deadline=datetime.now(), - assessment_start=datetime.now(), - reminder_date=datetime.now(), - assessment_deadline=datetime.now(), + opens=datetime.now().strftime("%m-%d-%Y %H:%M"), + deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_start=datetime.now().strftime("%m-%d-%Y %H:%M"), + reminder_date=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), prospectus_link="http://www.example.com", privacy_notice_link="http://www.example.com", contact_email="test@example.com", diff --git a/tests/test_config_export.py b/tests/test_config_export.py index ee3f2e42..048298d3 100644 --- a/tests/test_config_export.py +++ b/tests/test_config_export.py @@ -65,16 +65,16 @@ def test_generate_config_for_round_valid_input(seed_dynamic_data, monkeypatch): "prospectus": "http://www.google.com", "privacy_notice": "http://www.google.com", "reference_contact_page_over_email": False, - "contact_email": None, - "contact_phone": None, - "contact_textphone": None, - "support_times": "", - "support_days": "", + "contact_email": "test@test.com", + "contact_phone": "0123334444", + "contact_textphone": "0123334444", + "support_times": "9am to 5pm", + "support_days": "Monday to Friday", "instructions_json": None, - "feedback_link": None, - "project_name_field_id": "", + "feedback_link": "http://www.google.com", + "project_name_field_id": "12312312312", "application_guidance_json": None, - "guidance_url": None, + "guidance_url": "http://www.google.com", "all_uploaded_documents_section_available": False, "application_fields_download_available": False, "display_logo_on_pdf_exports": False, diff --git a/tests/test_db.py b/tests/test_db.py index ea6671e9..282760b1 100644 --- a/tests/test_db.py +++ b/tests/test_db.py @@ -82,11 +82,11 @@ def test_add_round(seed_dynamic_data): audit_info={"user": "dummy_user", "timestamp": datetime.now().isoformat(), "action": "create"}, title_json={"en": "test title"}, short_name=f"Z{randint(0,99999)}", - opens=datetime.now(), - deadline=datetime.now(), - assessment_start=datetime.now(), - reminder_date=datetime.now(), - assessment_deadline=datetime.now(), + opens=datetime.now().strftime("%m-%d-%Y %H:%M"), + deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_start=datetime.now().strftime("%m-%d-%Y %H:%M"), + reminder_date=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), prospectus_link="http://www.google.com", privacy_notice_link="http://www.google.com", application_reminder_sent=False, @@ -108,7 +108,7 @@ def test_add_round(seed_dynamic_data): mark_as_complete_enabled=False, is_expression_of_interest=False, feedback_survey_config={}, - eligibility_config={}, + eligibility_config={"has_eligibility": "true"}, eoi_decision_schema={}, ) ) @@ -176,11 +176,11 @@ def test_get_round_by_id_none(flask_test_client, _db): audit_info={"user": "dummy_user", "timestamp": datetime.now().isoformat(), "action": "create"}, title_json={"en": "round the first"}, short_name="R1", - opens=datetime.now(), - deadline=datetime.now(), - assessment_start=datetime.now(), - reminder_date=datetime.now(), - assessment_deadline=datetime.now(), + opens=datetime.now().strftime("%m-%d-%Y %H:%M"), + deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_start=datetime.now().strftime("%m-%d-%Y %H:%M"), + reminder_date=datetime.now().strftime("%m-%d-%Y %H:%M"), + assessment_deadline=datetime.now().strftime("%m-%d-%Y %H:%M"), prospectus_link="http://www.google.com", privacy_notice_link="http://www.google.com", application_reminder_sent=False, @@ -202,7 +202,7 @@ def test_get_round_by_id_none(flask_test_client, _db): mark_as_complete_enabled=False, is_expression_of_interest=False, feedback_survey_config={}, - eligibility_config={}, + eligibility_config={"has_eligibility": "true"}, eoi_decision_schema={}, ) ],