66
77from aleph .db .models import MessageDb
88from aleph .db .models .messages import MessageStatusDb
9- from aleph .toolkit .timestamp import timestamp_to_datetime , utc_now
9+ from aleph .toolkit .timestamp import utc_now
1010from aleph .types .channel import Channel
1111from aleph .types .db_session import DbSessionFactory
1212from aleph .types .message_status import MessageStatus
@@ -30,7 +30,9 @@ def fixture_post_messages_with_types(
3030 signature = "0x" + "0" * 128 ,
3131 item_type = ItemType .inline ,
3232 type = MessageType .post ,
33- item_content = '{"address":"' + TEST_ADDRESS + '","time":1652126646.5,"type":"blog","content":{"title":"Post 1"}}' ,
33+ item_content = '{"address":"'
34+ + TEST_ADDRESS
35+ + '","time":1652126646.5,"type":"blog","content":{"title":"Post 1"}}' ,
3436 content = {
3537 "address" : TEST_ADDRESS ,
3638 "time" : 1652126646.5 ,
@@ -48,7 +50,9 @@ def fixture_post_messages_with_types(
4850 signature = "0x" + "0" * 128 ,
4951 item_type = ItemType .inline ,
5052 type = MessageType .post ,
51- item_content = '{"address":"' + TEST_ADDRESS + '","time":1652126647.5,"type":"blog","content":{"title":"Post 2"}}' ,
53+ item_content = '{"address":"'
54+ + TEST_ADDRESS
55+ + '","time":1652126647.5,"type":"blog","content":{"title":"Post 2"}}' ,
5256 content = {
5357 "address" : TEST_ADDRESS ,
5458 "time" : 1652126647.5 ,
@@ -66,7 +70,9 @@ def fixture_post_messages_with_types(
6670 signature = "0x" + "0" * 128 ,
6771 item_type = ItemType .inline ,
6872 type = MessageType .post ,
69- item_content = '{"address":"' + TEST_ADDRESS + '","time":1652126648.5,"type":"news","content":{"title":"News 1"}}' ,
73+ item_content = '{"address":"'
74+ + TEST_ADDRESS
75+ + '","time":1652126648.5,"type":"news","content":{"title":"News 1"}}' ,
7076 content = {
7177 "address" : TEST_ADDRESS ,
7278 "time" : 1652126648.5 ,
@@ -84,7 +90,9 @@ def fixture_post_messages_with_types(
8490 signature = "0x" + "0" * 128 ,
8591 item_type = ItemType .inline ,
8692 type = MessageType .post ,
87- item_content = '{"address":"' + TEST_ADDRESS + '","time":1652126649.5,"type":"tutorial","content":{"title":"Tutorial 1"}}' ,
93+ item_content = '{"address":"'
94+ + TEST_ADDRESS
95+ + '","time":1652126649.5,"type":"tutorial","content":{"title":"Tutorial 1"}}' ,
8896 content = {
8997 "address" : TEST_ADDRESS ,
9098 "time" : 1652126649.5 ,
@@ -103,7 +111,9 @@ def fixture_post_messages_with_types(
103111 signature = "0x" + "0" * 128 ,
104112 item_type = ItemType .inline ,
105113 type = MessageType .aggregate ,
106- item_content = '{"address":"' + TEST_ADDRESS + '","key":"test","time":1652126650.5,"content":{}}' ,
114+ item_content = '{"address":"'
115+ + TEST_ADDRESS
116+ + '","key":"test","time":1652126650.5,"content":{}}' ,
107117 content = {
108118 "address" : TEST_ADDRESS ,
109119 "key" : "test" ,
@@ -293,7 +303,9 @@ def fixture_messages_with_channels(
293303 signature = "0x" + "0" * 128 ,
294304 item_type = ItemType .inline ,
295305 type = MessageType .post ,
296- item_content = '{"address":"' + TEST_ADDRESS + '","time":1652126646.5,"type":"blog","content":{}}' ,
306+ item_content = '{"address":"'
307+ + TEST_ADDRESS
308+ + '","time":1652126646.5,"type":"blog","content":{}}' ,
297309 content = {
298310 "address" : TEST_ADDRESS ,
299311 "time" : 1652126646.5 ,
@@ -311,7 +323,9 @@ def fixture_messages_with_channels(
311323 signature = "0x" + "0" * 128 ,
312324 item_type = ItemType .inline ,
313325 type = MessageType .post ,
314- item_content = '{"address":"' + TEST_ADDRESS + '","time":1652126647.5,"type":"blog","content":{}}' ,
326+ item_content = '{"address":"'
327+ + TEST_ADDRESS
328+ + '","time":1652126647.5,"type":"blog","content":{}}' ,
315329 content = {
316330 "address" : TEST_ADDRESS ,
317331 "time" : 1652126647.5 ,
@@ -329,7 +343,9 @@ def fixture_messages_with_channels(
329343 signature = "0x" + "0" * 128 ,
330344 item_type = ItemType .inline ,
331345 type = MessageType .aggregate ,
332- item_content = '{"address":"' + TEST_ADDRESS + '","key":"test","time":1652126648.5,"content":{}}' ,
346+ item_content = '{"address":"'
347+ + TEST_ADDRESS
348+ + '","key":"test","time":1652126648.5,"content":{}}' ,
333349 content = {
334350 "address" : TEST_ADDRESS ,
335351 "key" : "test" ,
@@ -347,7 +363,9 @@ def fixture_messages_with_channels(
347363 signature = "0x" + "0" * 128 ,
348364 item_type = ItemType .inline ,
349365 type = MessageType .store ,
350- item_content = '{"address":"' + TEST_ADDRESS + '","time":1652126649.5,"item_hash":"hash123","item_type":"ipfs"}' ,
366+ item_content = '{"address":"'
367+ + TEST_ADDRESS
368+ + '","time":1652126649.5,"item_hash":"hash123","item_type":"ipfs"}' ,
351369 content = {
352370 "address" : TEST_ADDRESS ,
353371 "time" : 1652126649.5 ,
@@ -366,7 +384,9 @@ def fixture_messages_with_channels(
366384 signature = "0x" + "0" * 128 ,
367385 item_type = ItemType .inline ,
368386 type = MessageType .post ,
369- item_content = '{"address":"' + TEST_ADDRESS + '","time":1652126650.5,"type":"blog","content":{}}' ,
387+ item_content = '{"address":"'
388+ + TEST_ADDRESS
389+ + '","time":1652126650.5,"type":"blog","content":{}}' ,
370390 content = {
371391 "address" : TEST_ADDRESS ,
372392 "time" : 1652126650.5 ,
@@ -594,4 +614,3 @@ async def test_get_account_channels_single_channel(
594614
595615 assert data ["address" ] == address
596616 assert data ["channels" ] == ["single_channel" ]
597-
0 commit comments