test_get_custom_videos_directory attaches the shared context it needs (#937)

Setting a config field calls ConfigFile.update(), which takes
api_app.shared_ctx.config_update_lock.  The test did not use async_client,
so the lock only existed when another test in the same process had already
attached the shared context; running first in a worker, it failed with
"'SharedContext' object has no attribute 'config_update_lock'".

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
lrnselfreliance 2026-11-02 16:31:36 -07:00 • committed by Roland
parent 662a41afc3
commit 2991f737da
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680

View file

@ -606,7 +606,7 @@ def test_get_videos_directory(test_directory):
assert (test_directory / 'videos').is_dir()
def test_get_custom_videos_directory(test_directory, test_wrolpi_config):
def test_get_custom_videos_directory(async_client, test_directory, test_wrolpi_config):
"""Custom directory can be used for videos directory."""
config = get_wrolpi_config()
config.videos_destination = 'custom/directory/videos'