refactor: Remove Message.set_file() / dc_msg_set_file() and related code (#6558)

Now that we are deduplicating everywhere, we can get rid of some code.

The old python bindings did not get an optional `name` parameter because
they are deprecated anyway, but it would be easy to add it.
This commit is contained in:
Hocuri
2025-02-22 10:47:52 +01:00
committed by GitHub
parent 253331b7fd
commit a49dfeca6e
9 changed files with 77 additions and 108 deletions

View File

@@ -436,11 +436,11 @@ class TestOfflineChat:
assert msg.id > 0
assert msg.is_file()
assert os.path.exists(msg.filename)
assert msg.filename.endswith(msg.basename)
assert msg.filename.endswith(".txt") == fn.endswith(".txt")
assert msg.filemime == typeout
msg2 = chat1.send_file(fp, typein)
assert msg2 != msg
assert msg2.filename != msg.filename
assert msg2.filename == msg.filename
def test_create_contact(self, acfactory):
ac1 = acfactory.get_pseudo_configured_account()