From dac9f56901ba277354ae3877f4e462e35340db4a Mon Sep 17 00:00:00 2001 From: Sergi Delgado Segura Date: Mon, 9 Dec 2019 13:31:06 +0100 Subject: [PATCH] Gets rid of Appointment.serialize() The method is replaced by signature_foramt in Cryptographer --- pisa/appointment.py | 4 ---- test/unit/test_appointment.py | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/pisa/appointment.py b/pisa/appointment.py index 4c1f302..c881aa5 100644 --- a/pisa/appointment.py +++ b/pisa/appointment.py @@ -49,7 +49,3 @@ class Appointment: def to_json(self): return json.dumps(self.to_dict(), sort_keys=True, separators=(",", ":")) - - def serialize(self): - # FIXME: This is temporary serialization. A proper one is required - return self.to_dict(include_triggered=False) diff --git a/test/unit/test_appointment.py b/test/unit/test_appointment.py index 2eff9e9..1ed42ed 100644 --- a/test/unit/test_appointment.py +++ b/test/unit/test_appointment.py @@ -110,13 +110,3 @@ def test_from_dict(appointment_data): except ValueError: appointment_data[key] = prev_val assert True - - -# This test is pretty worthless atm, it would make sense once we have a proper serialize function -def test_serialize(appointment_data): - appointment = Appointment.from_dict(appointment_data) - - assert appointment.triggered is False - ser_appointment = appointment.serialize() - - assert ser_appointment == appointment.to_dict(include_triggered=False)