mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
pytest: Use datetime.strptime instead of datetime.fromisoformat
The latter is available only starting with Python 3.7, and it's the only test that fails with <3.7. This allows us to keep on testing with older versions.
This commit is contained in:
parent
c9d24b1de2
commit
bb0910999e
@ -694,8 +694,8 @@ def test_channel_state_changed_bilateral(node_factory, bitcoind):
|
||||
assert(event2['message'] == "Lockin complete")
|
||||
|
||||
# also test the correctness of timestamps once
|
||||
assert(datetime.fromisoformat(event1['timestamp'].replace('Z', '+00:00')))
|
||||
assert(datetime.fromisoformat(event2['timestamp'].replace('Z', '+00:00')))
|
||||
assert(datetime.strptime(event1['timestamp'], '%Y-%m-%dT%H:%M:%S.%fZ'))
|
||||
assert(datetime.strptime(event2['timestamp'], '%Y-%m-%dT%H:%M:%S.%fZ'))
|
||||
|
||||
# close channel and look for stateful events
|
||||
l1.rpc.close(scid)
|
||||
|
Loading…
Reference in New Issue
Block a user