Coverage for src/tests/test_dummy_data.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.5.0, created at 2024-10-15 13:03 +0000

1from couchers.db import session_scope 

2from couchers.resources import copy_resources_to_database 

3from dummy_data import add_dummy_data 

4from tests.test_fixtures import db, testconfig # noqa 

5 

6 

7def test_add_dummy_data(db, caplog, testconfig): 

8 # copy the real resources to the database: this way if the testing resources go out of date with the real ones 

9 # causing dummy data to fail, we'll catch it easily 

10 with session_scope() as session: 

11 copy_resources_to_database(session) 

12 

13 add_dummy_data() 

14 assert len(caplog.records) == 0