mirror of
https://github.com/facefusion/facefusion.git
synced 2026-09-17 04:55:26 +02:00
Session aware stores (#1235)
* session aware process manager via store creator * remove unused clear_session_id * restore original scopes * stateless test helpers * more updates * more updates * more updates * more updates --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
5bc9c80c55
commit
c358ba7cf6
@@ -0,0 +1,20 @@
|
||||
import pytest
|
||||
|
||||
from facefusion.session_context import get_session_id, resolve_local_id, set_session_id
|
||||
|
||||
|
||||
@pytest.fixture(scope = 'function', autouse = True)
|
||||
def before_each() -> None:
|
||||
set_session_id(resolve_local_id())
|
||||
|
||||
|
||||
def test_get_session_id() -> None:
|
||||
assert get_session_id() == resolve_local_id()
|
||||
|
||||
set_session_id('session-a')
|
||||
|
||||
assert get_session_id() == 'session-a'
|
||||
|
||||
|
||||
def test_resolve_local_id() -> None:
|
||||
assert resolve_local_id() == resolve_local_id()
|
||||
Reference in New Issue
Block a user