mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Move test_sign_appointment after test_add_appointment, as per PR review
This commit is contained in:
@@ -102,12 +102,6 @@ def test_init(watcher):
|
||||
assert type(watcher.responder) is Responder
|
||||
|
||||
|
||||
def test_sign_appointment(watcher):
|
||||
appointment, _ = generate_dummy_appointment()
|
||||
signature = watcher.sign_appointment(appointment)
|
||||
assert is_signature_valid(appointment, signature, public_key)
|
||||
|
||||
|
||||
def test_add_appointment(run_bitcoind, watcher):
|
||||
# The watcher automatically fires do_watch and do_subscribe on adding an appointment if it is asleep (initial state)
|
||||
# Avoid this by setting the state to awake.
|
||||
@@ -122,6 +116,12 @@ def test_add_appointment(run_bitcoind, watcher):
|
||||
assert is_signature_valid(appointment, sig, public_key)
|
||||
|
||||
|
||||
def test_sign_appointment(watcher):
|
||||
appointment, _ = generate_dummy_appointment()
|
||||
signature = watcher.sign_appointment(appointment)
|
||||
assert is_signature_valid(appointment, signature, public_key)
|
||||
|
||||
|
||||
def test_add_too_many_appointments(watcher):
|
||||
# Any appointment on top of those should fail
|
||||
watcher.appointments = dict()
|
||||
|
||||
Reference in New Issue
Block a user