pytest tests.model.test_persistence

class tests.model.test_persistence.TestPersistence(temp_dir: Path)

Bases: object

A container for tests that exercise the method in the biometrics_tracker.model.persistence.DataBase class

check_sqlite3()
close_db_connection()
create_db_connection()
db_open_do_close()
dp_err_preamble()
insert_datapoints()
sched_err_preamble()
test_create_database()
test_drop_database()
test_people_list()
test_person_insert_retrieve()
test_person_update()
test_schedule_delete()
test_schedule_insert()
test_schedule_update()
test_schedule_update_last_triggered()
test_tracking_cfg_insert()
test_tracking_cfg_update()
tests.model.test_persistence.test_create_drop(tmpdir)

Tests the biometrics_tracker.model.persistence.DataBase.create_db and drop_db methods. This is implemented as a module level function because pytest, or Pycharm’s pytest framework doesn’t seem to be able to properly run tests implemented as bound methods.

Parameters

tmpdir – a fixture that provides a temporary directory where the test database will be created.

Returns

None