mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-07 01:03:34 +02:00
Behave better around DM dedupe/storage. Closes #77.
This commit is contained in:
@@ -78,8 +78,8 @@ async def test_null_sender_timestamp_defaults_to_received_at(test_db):
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_direct_messages_with_same_text_and_timestamp_are_allowed(test_db):
|
||||
"""Direct messages no longer share the channel echo dedup index."""
|
||||
async def test_incoming_direct_messages_with_same_text_and_timestamp_dedup(test_db):
|
||||
"""Incoming direct messages now collapse onto one content-identity row."""
|
||||
received_at = 600
|
||||
msg_id1 = await MessageRepository.create(
|
||||
msg_type="PRIV",
|
||||
@@ -97,8 +97,7 @@ async def test_direct_messages_with_same_text_and_timestamp_are_allowed(test_db)
|
||||
sender_timestamp=received_at,
|
||||
received_at=received_at,
|
||||
)
|
||||
assert msg_id2 is not None
|
||||
assert msg_id2 != msg_id1
|
||||
assert msg_id2 is None
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user