1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 02:09:17 +02:00

- refine msg.time_sent to return a correct utc-based "naive" datetime object

- accept message objects instead of just ints for get_mime_headers(msg)
This commit is contained in:
holger krekel 2018-10-16 23:24:38 +02:00
parent 466c660fc6
commit 21f3a6b006
3 changed files with 7 additions and 5 deletions

View file

@ -178,7 +178,7 @@ class TestOfflineAccount:
ac1 = acfactory.get_configured_offline_account()
contact1 = ac1.create_contact("some1@hello.com", name="some1")
chat = ac1.create_chat_by_contact(contact1)
past1s = datetime.now() - timedelta(seconds=1)
past1s = datetime.utcnow() - timedelta(seconds=1)
msg = chat.send_text("msg1")
ts = msg.time_sent
assert ts.strftime("Y")
@ -297,6 +297,7 @@ class TestOnlineAccount:
mime = ac2.get_mime_headers(in_id)
assert mime.get_all("From")
assert mime.get_all("Received")
assert ac2.get_mime_headers(ac2.get_message_by_id(in_id)).get_all("From")
def test_send_and_receive_image(self, acfactory, lp, data):
lp.sec("starting accounts, waiting for configuration")