Merge pull request #34 from Hestia-Homes/feature/more_tests

Feature/more tests
This commit is contained in:
Jun-te Kim 2025-03-31 11:38:25 +01:00 committed by GitHub
commit 663ebe6422
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 4 deletions

View file

@ -1,6 +1,7 @@
name: SCIS Invoice Calculator
on:
schedule:
- cron: '0 9 * * *'
- cron: '0 6 * * *'
workflow_dispatch:
jobs:

View file

@ -1,6 +1,7 @@
name: SharePoint Validator
on:
schedule:
- cron: '0 9 * * *'
- cron: '0 6 * * *'
workflow_dispatch:
jobs:

View file

@ -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"
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)

1
run_tests.sh Normal file
View file

@ -0,0 +1 @@
poetry run pytest