From f0143efd14885c4abbbb80aadd41a39bb88ff752 Mon Sep 17 00:00:00 2001 From: Salvatore Ingala <6681844+bigspider@users.noreply.github.com> Date: Mon, 28 Oct 2019 11:11:39 +0700 Subject: [PATCH] Move test_sign_appointment after test_add_appointment, as per PR review --- test/unit/test_watcher.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/unit/test_watcher.py b/test/unit/test_watcher.py index 06aff9c..afe1f59 100644 --- a/test/unit/test_watcher.py +++ b/test/unit/test_watcher.py @@ -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()