Revert "Merge pull request #25: Add matrix optional dependencies and fix tests"
This reverts commit65aca4d260, reversing changes made to53e09b924c.
This commit is contained in:
@@ -50,11 +50,6 @@ dev = [
|
|||||||
mem0 = [
|
mem0 = [
|
||||||
"mem0ai>=0.1.0",
|
"mem0ai>=0.1.0",
|
||||||
]
|
]
|
||||||
matrix = [
|
|
||||||
"matrix-nio>=0.20.0",
|
|
||||||
"mistune>=3.0.0",
|
|
||||||
"nh3>=0.2.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
nanobot = "nanobot.cli.commands:app"
|
nanobot = "nanobot.cli.commands:app"
|
||||||
|
|||||||
@@ -676,7 +676,7 @@ async def test_on_media_message_respects_declared_size_limit(
|
|||||||
assert client.download_calls == []
|
assert client.download_calls == []
|
||||||
assert len(handled) == 1
|
assert len(handled) == 1
|
||||||
assert handled[0]["media"] == []
|
assert handled[0]["media"] == []
|
||||||
assert handled[0]["metadata"].get("attachments", []) == []
|
assert handled[0]["metadata"]["attachments"] == []
|
||||||
assert "[attachment: large.bin - too large]" in handled[0]["content"]
|
assert "[attachment: large.bin - too large]" in handled[0]["content"]
|
||||||
|
|
||||||
|
|
||||||
@@ -712,7 +712,7 @@ async def test_on_media_message_uses_server_limit_when_smaller_than_local_limit(
|
|||||||
assert client.download_calls == []
|
assert client.download_calls == []
|
||||||
assert len(handled) == 1
|
assert len(handled) == 1
|
||||||
assert handled[0]["media"] == []
|
assert handled[0]["media"] == []
|
||||||
assert handled[0]["metadata"].get("attachments", []) == []
|
assert handled[0]["metadata"]["attachments"] == []
|
||||||
assert "[attachment: large.bin - too large]" in handled[0]["content"]
|
assert "[attachment: large.bin - too large]" in handled[0]["content"]
|
||||||
|
|
||||||
|
|
||||||
@@ -746,7 +746,7 @@ async def test_on_media_message_handles_download_error(monkeypatch, tmp_path) ->
|
|||||||
assert len(client.download_calls) == 1
|
assert len(client.download_calls) == 1
|
||||||
assert len(handled) == 1
|
assert len(handled) == 1
|
||||||
assert handled[0]["media"] == []
|
assert handled[0]["media"] == []
|
||||||
assert handled[0]["metadata"].get("attachments", []) == []
|
assert handled[0]["metadata"]["attachments"] == []
|
||||||
assert "[attachment: photo.png - download failed]" in handled[0]["content"]
|
assert "[attachment: photo.png - download failed]" in handled[0]["content"]
|
||||||
|
|
||||||
|
|
||||||
@@ -830,7 +830,7 @@ async def test_on_media_message_handles_decrypt_error(monkeypatch, tmp_path) ->
|
|||||||
|
|
||||||
assert len(handled) == 1
|
assert len(handled) == 1
|
||||||
assert handled[0]["media"] == []
|
assert handled[0]["media"] == []
|
||||||
assert handled[0]["metadata"].get("attachments", []) == []
|
assert handled[0]["metadata"]["attachments"] == []
|
||||||
assert "[attachment: secret.txt - download failed]" in handled[0]["content"]
|
assert "[attachment: secret.txt - download failed]" in handled[0]["content"]
|
||||||
|
|
||||||
|
|
||||||
@@ -972,6 +972,7 @@ async def test_send_passes_thread_relates_to_to_attachment_upload(monkeypatch) -
|
|||||||
captured: dict[str, object] = {}
|
captured: dict[str, object] = {}
|
||||||
|
|
||||||
async def _fake_upload_and_send_attachment(
|
async def _fake_upload_and_send_attachment(
|
||||||
|
*,
|
||||||
room_id: str,
|
room_id: str,
|
||||||
path: Path,
|
path: Path,
|
||||||
limit_bytes: int,
|
limit_bytes: int,
|
||||||
|
|||||||
Reference in New Issue
Block a user