@pytest.mark.asyncio
async def test_basic_store(self):
    async with DBConnection() as db_wrapper:
        hint_store = (await HintStore.create(db_wrapper))
        hint_0 = (32 * b'\x00')
        hint_1 = (32 * b'\x01')
        not_existing_hint = (32 * b'\x03')
        coin_id_0 = (32 * b'\x04')
        coin_id_1 = (32 * b'\x05')
        coin_id_2 = (32 * b'\x06')
        hints = [(coin_id_0, hint_0), (coin_id_1, hint_0), (coin_id_2, hint_1)]
        (await hint_store.add_hints(hints))
        (await db_wrapper.commit_transaction())
        coins_for_hint_0 = (await hint_store.get_coin_ids(hint_0))
        assert (coin_id_0 in coins_for_hint_0)
        assert (coin_id_1 in coins_for_hint_0)
        coins_for_hint_1 = (await hint_store.get_coin_ids(hint_1))
        assert (coin_id_2 in coins_for_hint_1)
        coins_for_non_hint = (await hint_store.get_coin_ids(not_existing_hint))
        assert (coins_for_non_hint == [])
@pytest.mark.asyncio
async def test_basic_store(self):
    async with DBConnection() as db_wrapper:
        hint_store = (await HintStore.create(db_wrapper))
        hint_0 = (32 * b'\x00')
        hint_1 = (32 * b'\x01')
        not_existing_hint = (32 * b'\x03')
        coin_id_0 = (32 * b'\x04')
        coin_id_1 = (32 * b'\x05')
        coin_id_2 = (32 * b'\x06')
        hints = [(coin_id_0, hint_0), (coin_id_1, hint_0), (coin_id_2, hint_1)]
        (await hint_store.add_hints(hints))
        (await db_wrapper.commit_transaction())
        coins_for_hint_0 = (await hint_store.get_coin_ids(hint_0))
        assert (coin_id_0 in coins_for_hint_0)
        assert (coin_id_1 in coins_for_hint_0)
        coins_for_hint_1 = (await hint_store.get_coin_ids(hint_1))
        assert (coin_id_2 in coins_for_hint_1)
        coins_for_non_hint = (await hint_store.get_coin_ids(not_existing_hint))
        assert (coins_for_non_hint == [])