first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from sync_state_machine.engine.semantics import (
|
||||
CoreBindingResult,
|
||||
classify_core_pair,
|
||||
)
|
||||
|
||||
|
||||
def test_core_pair_and_event_mapping():
|
||||
local, peer = classify_core_pair(
|
||||
has_binding_record=True,
|
||||
local_data={"id": "l1"},
|
||||
peer_data={"id": "r1"},
|
||||
)
|
||||
assert (local, peer) == (CoreBindingResult.NORMAL, CoreBindingResult.NORMAL)
|
||||
|
||||
local2, peer2 = classify_core_pair(
|
||||
has_binding_record=True,
|
||||
local_data={"id": "l1"},
|
||||
peer_data=None,
|
||||
)
|
||||
assert (local2, peer2) == (CoreBindingResult.WARNING, CoreBindingResult.ABNORMAL)
|
||||
Reference in New Issue
Block a user