mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 03:46:29 -05:00
tests: bookmark config import tests set up the app's shared context
They read `successful_import`, which lives in the shared context that `async_client` attaches. They only passed when an earlier test in the same xdist worker had attached it; run first, all 13 failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8b846c57eb
commit
1c214f4033
1 changed files with 2 additions and 2 deletions
|
|
@ -175,7 +175,7 @@ def test_bookmarks_config_import(test_directory, test_wrolpi_config):
|
|||
['not a node'],
|
||||
'not a list',
|
||||
])
|
||||
def test_bookmarks_config_import_rejects_bad_tree(test_directory, test_wrolpi_config, bookmarks):
|
||||
async def test_bookmarks_config_import_rejects_bad_tree(async_client, test_directory, test_wrolpi_config, bookmarks):
|
||||
"""A hand-edited file that the API would refuse is not imported, and is not overwritten."""
|
||||
config_file = test_directory / 'config/bookmarks.yaml'
|
||||
config_file.parent.mkdir(exist_ok=True)
|
||||
|
|
@ -195,7 +195,7 @@ def test_bookmarks_config_import_rejects_bad_tree(test_directory, test_wrolpi_co
|
|||
assert config_file.read_text() == original
|
||||
|
||||
|
||||
def test_bookmarks_config_import_rejects_cycle(test_directory, test_wrolpi_config):
|
||||
async def test_bookmarks_config_import_rejects_cycle(async_client, test_directory, test_wrolpi_config):
|
||||
"""A YAML anchor can make a directory contain itself; walking that would never end."""
|
||||
config_file = test_directory / 'config/bookmarks.yaml'
|
||||
config_file.parent.mkdir(exist_ok=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue