Example #1
0
def test_lastplayed_from_iso_none():
   assert _normalize_last_played({'lastModified': None}) == None
Example #2
0
def test_lastplayed_from_iso_2():
   iso = '2017-09-29T22:14:00.000Z'
   timestamp_rounded = 1506723240
   assert _normalize_last_played({'lastModified': iso}) == timestamp_rounded
Example #3
0
def test_lastplayed_from_iso_3():
   iso = '1970-01-01T00:01:00Z'
   timestamp_rounded = 60
   assert _normalize_last_played({'lastModified': iso}) == timestamp_rounded
Example #4
0
def test_lastplayed_from_iso():
   iso = '2019-03-21T12:01:19.636Z'
   timestamp_rounded = 1553169680
   assert _normalize_last_played({'lastModified': iso}) == timestamp_rounded