tests.unit_tests.db.test_yawning_titan_db#
This test module tests the YawningTitanDB class using the DemoDB subclass.
Functions
A basic list of docs with the structure. |
|
Test the YawningTitanDB.insert and YawningTitanDB.all functions. |
|
Test the YawningTitanDB.count function. |
|
Test the awningTitanDB.get function. |
|
Test YawningTitanDB.get_with_uuid function fails with duplicate uuid's. |
|
Test YawningTitanDB.insert function fails with duplicate uuid's. |
|
Test the YawningTitanDB.remove function. |
|
Test the YawningTitanDB.remove function fails when removing a locked entry. |
|
Test the YawningTitanDB.remove_with_uuid function. |
|
Test YawningTitanDB.remove_with_uuid function fails with duplicate uuid's. |
|
Test the YawningTitanDB.search function. |
|
Test the YawningTitanDB.insert and YawningTitanDB.update functions. |
|
Test the YawningTitanDB.update function fails when updating a locked entry. |
|
Test the YawningTitanDB.update function with new metadata. |
|
Test the YawningTitanDB.upsert function with a new insert. |
|
Test the YawningTitanDB.upsert function with an update. |
Classes
An implementation of |
|
A schema-like class that defines the DB fields in |
- tests.unit_tests.db.test_yawning_titan_db.demo_db_docs()[source]#
A basic list of docs with the structure.
forename: str
surname: str
age: int
hobbies: List[str]
- class tests.unit_tests.db.test_yawning_titan_db.DemoSchema[source]#
A schema-like class that defines the DB fields in
demo_db_docs()
.
- class tests.unit_tests.db.test_yawning_titan_db.DemoDB(name)[source]#
An implementation of
YawningTitanDB
.
- tests.unit_tests.db.test_yawning_titan_db.test_all(demo_db_docs)[source]#
Test the YawningTitanDB.insert and YawningTitanDB.all functions.
- tests.unit_tests.db.test_yawning_titan_db.test_get(demo_db_docs)[source]#
Test the awningTitanDB.get function.
- tests.unit_tests.db.test_yawning_titan_db.test_search(demo_db_docs)[source]#
Test the YawningTitanDB.search function.
- tests.unit_tests.db.test_yawning_titan_db.test_count(demo_db_docs)[source]#
Test the YawningTitanDB.count function.
- tests.unit_tests.db.test_yawning_titan_db.test_insert_existing_uuid_fails(demo_db_docs)[source]#
Test YawningTitanDB.insert function fails with duplicate uuid’s.
- tests.unit_tests.db.test_yawning_titan_db.test_get_with_uuid_multiple_fails(demo_db_docs)[source]#
Test YawningTitanDB.get_with_uuid function fails with duplicate uuid’s.
- tests.unit_tests.db.test_yawning_titan_db.test_update(demo_db_docs)[source]#
Test the YawningTitanDB.insert and YawningTitanDB.update functions.
- tests.unit_tests.db.test_yawning_titan_db.test_update_metadata(demo_db_docs)[source]#
Test the YawningTitanDB.update function with new metadata.
- tests.unit_tests.db.test_yawning_titan_db.test_update_locked_fails(demo_db_docs)[source]#
Test the YawningTitanDB.update function fails when updating a locked entry.
- tests.unit_tests.db.test_yawning_titan_db.test_upsert_insert(demo_db_docs)[source]#
Test the YawningTitanDB.upsert function with a new insert.
- tests.unit_tests.db.test_yawning_titan_db.test_upsert_update(demo_db_docs)[source]#
Test the YawningTitanDB.upsert function with an update.
- tests.unit_tests.db.test_yawning_titan_db.test_remove(demo_db_docs)[source]#
Test the YawningTitanDB.remove function.
- tests.unit_tests.db.test_yawning_titan_db.test_remove_with_uuid(demo_db_docs)[source]#
Test the YawningTitanDB.remove_with_uuid function.