def test_init_db(hk_config): """Test to setup the database""" # GIVEN a housekeeper api and some hk configs api = HousekeeperAPI(hk_config) # WHEN initiating the database api.initialise_db() # THEN the api should work assert api.add_tag("a-tag")
def fixture_real_housekeeper_api(hk_config_dict: dict) -> HousekeeperAPI: """Setup a real Housekeeper store.""" _api = HousekeeperAPI(hk_config_dict) _api.initialise_db() yield _api
def fixture_housekeeper_api(hk_config): """Setup Housekeeper store.""" _api = HousekeeperAPI(hk_config) _api.initialise_db() yield _api _api.destroy_db()