Testing that File.a_text is filled even if the file does not match an indexer.

This commit is contained in:
Roland 2022-12-15 14:06:03 -07:00
parent b47df503ab
commit 92abd6b627
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -185,6 +185,17 @@ async def test_refresh_files(test_session, make_files_structure, test_directory)
assert_files(test_session, [])
@pytest.mark.asyncio
async def test_refresh_a_text_no_indexer(test_session, make_files_structure):
"""File.a_text is filled even if the file does not match an Indexer."""
make_files_structure(['foo', 'bar-bar'])
await lib.refresh_files()
files = {i.a_text for i in test_session.query(File).all()}
assert files == {'{bar,bar-bar}', '{foo}'}
@pytest.mark.asyncio
async def test_refresh_many_files(test_session, make_files_structure):
"""Used to profile file refreshing"""