diff --git a/.github/workflows/scis_invoice_calculator.yml b/.github/workflows/scis_invoice_calculator.yml index 140bc2f..66a5461 100644 --- a/.github/workflows/scis_invoice_calculator.yml +++ b/.github/workflows/scis_invoice_calculator.yml @@ -1,6 +1,7 @@ +name: SCIS Invoice Calculator on: schedule: - - cron: '0 9 * * *' + - cron: '0 6 * * *' workflow_dispatch: jobs: diff --git a/.github/workflows/sharepoint_validator.yml b/.github/workflows/sharepoint_validator.yml index 90fe665..bc22bee 100644 --- a/.github/workflows/sharepoint_validator.yml +++ b/.github/workflows/sharepoint_validator.yml @@ -1,6 +1,7 @@ +name: SharePoint Validator on: schedule: - - cron: '0 9 * * *' + - cron: '0 6 * * *' workflow_dispatch: jobs: diff --git a/etl/load.py b/etl/simple_load_example.py similarity index 100% rename from etl/load.py rename to etl/simple_load_example.py diff --git a/etl/tests/test_pre_site_note_class.py b/etl/tests/test_pre_site_note_class.py index a354cfa..58cf3e7 100644 --- a/etl/tests/test_pre_site_note_class.py +++ b/etl/tests/test_pre_site_note_class.py @@ -4,7 +4,7 @@ from etl.surveyedData.surveryedData import surveyedDataProcessor from etl.db.db import get_db_session, init_db from etl.transform.types import AssessorInfo import pytest - +from etl.jjc_invoice import work_out_total_floor_area @pytest.fixture(scope="module") def pre_site_note_path(): @@ -18,4 +18,11 @@ def local_survey(pre_site_note_path): def test_assessor_accreditation(local_survey): """Test that the assessor accreditation number is correct.""" - assert local_survey.pre_site_note.assessor_information.accreditation_number == "QUID211435" \ No newline at end of file + assert local_survey.pre_site_note.assessor_information.accreditation_number == "QUID211435" + + +def test_floor_area_calculator(local_survey): + # Floor area is important to work out invoice, make a test to work out invoice correctly + area = work_out_total_floor_area(local_survey.pre_site_note) + assert area == ('73-97m', 91) + \ No newline at end of file diff --git a/run_tests.sh b/run_tests.sh new file mode 100644 index 0000000..c7c20e0 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1 @@ +poetry run pytest