Skip to content

Commit 50affce

Browse files
maxnikulindanny0838
authored andcommitted
Convert id to local time in wsb2sb test (#32)
Allow `test_scrapbook_convert_wsb2sb.TestRun.test_meta_icon05` to pass in arbitrary timezone.
1 parent d4eabcd commit 50affce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/test_scrapbook_convert_wsb2sb.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,12 +435,13 @@ def test_meta_icon05(self):
435435
with open(self.test_output_rdf, 'rb') as fh:
436436
tree = etree.parse(fh)
437437

438+
ts = util.datetime_to_id_legacy(util.id_to_datetime('20200101000000000'))
438439
self.assertEqual(
439440
tree.find(f'{RDF}Description').attrib[f'{NS1}icon'],
440-
'resource://scrapbook/data/20200101080000/favicon.bmp'
441+
f'resource://scrapbook/data/{ts}/favicon.bmp'
441442
)
442443
self.assertTrue(
443-
os.path.isfile(os.path.join(self.test_output, 'data', '20200101080000', 'favicon.bmp'))
444+
os.path.isfile(os.path.join(self.test_output, 'data', ts, 'favicon.bmp'))
444445
)
445446

446447
def test_meta_icon06(self):

0 commit comments

Comments
 (0)