MCPcopy Create free account
hub / github.com/chatmail/core / test_message_file

Method test_message_file

python/tests/test_3_offline.py:384–396  ·  view source on GitHub ↗
(self, chat1, data, lp, fn, typein, typeout)

Source from the content-addressed store, hash-verified

382 ],
383 )
384 def test_message_file(self, chat1, data, lp, fn, typein, typeout):
385 lp.sec("sending file")
386 fp = data.get_path(fn)
387 msg = chat1.send_file(fp, typein)
388 assert msg
389 assert msg.id > 0
390 assert msg.is_file()
391 assert os.path.exists(msg.filename)
392 assert msg.filename.endswith(".txt") == fn.endswith(".txt")
393 assert msg.filemime == typeout
394 msg2 = chat1.send_file(fp, typein)
395 assert msg2 != msg
396 assert msg2.filename == msg.filename
397
398 def test_create_contact(self, acfactory):
399 ac1 = acfactory.get_pseudo_configured_account()

Callers

nothing calls this directly

Calls 5

secMethod · 0.80
is_fileMethod · 0.80
get_pathMethod · 0.45
send_fileMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected