pytest tests.model.test_datapoints
- tests.model.test_datapoints.common_dp_assertions(datum, datapoint: DataPoint)
Assertions that are common the testing of all DataPoint subclasses.
- Parameters
datum (collections.namedtuple('bg_dp_data_t', ['person_id', 'taken', 'note', 'data', 'type'])) – the data necessary to create a particular class of DataPoint
datapoint (biometrics_tracking.model.datapoints.DataPoint subclass) – a DataPoint instance
- Returns
None
- tests.model.test_datapoints.dp_error_preamble(person_id: str, taken: datetime, dp_type: DataPointType) str
Returns a formatted message fragment to be used in assertion messages for DataPoint tests
- Parameters
person_id (str) – ID of the person related to the DataPoint
taken (datetime.datetime) – the Taken datetime
dp_type (biometrics_tracker.model.datapoints.DataPointType) – DataPointType enum value
- Returns
None
- tests.model.test_datapoints.test_blood_glucose_init(blood_glucose_data_fix)
Tests the biometrics_tracker.model.datapoints.BloodGlucose init
- Parameters
blood_glucose_data_fix (list[collections.namedtuple('bg_data_t', ['value', 'uom'])]) – a fixture providing data to create a list of BloodGlucose objects
- Returns
None
- tests.model.test_datapoints.test_blood_pressure_init(blood_pressure_data_fix)
Tests the biometrics_tracking.model.datapoints.BloodPressure init
- Parameters
blood_pressure_data_fix (list[collections.namedtuple('bg_data_t', ['systolic', 'diastolic', 'uom'])]) – a fixture providing a the information to create a list of BloodPressure objects
- Returns
None
- tests.model.test_datapoints.test_frequency_name_map()
Tests the biometrics_tracker.model.datapoints.frequency_name map
- Returns
None
- tests.model.test_datapoints.test_person_init(person_data_fix)
Test biometrics_tracker.model.datapoints.Person initialization
- Parameters
person_data_fix (collections.namedtuple('person_data_t', ['id', 'name', 'dob', 'age'])) – a fixture providing data to create Person instances
- Returns
None
- tests.model.test_datapoints.test_pulse_init(pulse_data_fix)
Tests the biometrics_tracker.model.datapoints.Pulse init
- Parameters
pulse_data_fix (list[collections.namedtuple('bg_data_t', ['value', 'uom'])]) – a fixture providing data to create a list of Pulse objects
- Returns
None
- tests.model.test_datapoints.test_schedule_get_weekday_dates(schedule_fix)
Tests biometrics_tracker.model.datapoints.ScheduleEntry.get_weekday_dates method
- Parameters
schedule_fix (list[biometrics_tracker.model.datapoints.ScheduleEntry]) – a fixture providing a list of biometrics_tracker.model.datapoints.ScheduleEntry objects
- Returns
None
- tests.model.test_datapoints.test_schedule_init(schedule_fix)
Tests biometrics_tracker.model.datapoints.ScheduleEntry initialization
- Parameters
schedule_fix (list[biometrics_tracker.model.datapoints.ScheduleEntry]) – a fixture providing a list of biometrics_tracker.model.datapoints.ScheduleEntry objects
- Returns
None
- tests.model.test_datapoints.test_schedule_next_occurrence_today(schedule_fix)
Tests biometrics_tracker.model.datapoints.ScheduleEntry.next_occurrence_today method
- Parameters
schedule_fix (list[biometrics_tracker.model.datapoints.ScheduleEntry]) – a fixture providing a list of biometrics_tracker.model.datapoints.ScheduleEntry objects
- Returns
None
- tests.model.test_datapoints.test_tracking_config_init(tracking_config_fix)
Test biometrics_tracker.model.datapoints.TrackingConfig initialization
- Parameters
tracking_config_fix (list[biometrics_tracker.model.datapoints.TrackingConfig]) – a fixture providing a list of TrackingConfig instances
- Returns
None
- tests.model.test_datapoints.test_weekday_name_map()
Tests the biometrics_tracker.model.datapoints.weekday_name_map
- Returns
None