From 22b83b0814095d78b7e8023ae3cacdd3bdc825f7 Mon Sep 17 00:00:00 2001 From: Thomas Girod Date: Mon, 12 Dec 2022 22:56:06 +0100 Subject: [PATCH] remove useless tests --- subscription/models.py | 66 ------------------------------------------ 1 file changed, 66 deletions(-) diff --git a/subscription/models.py b/subscription/models.py index 29d4224a..b724b734 100644 --- a/subscription/models.py +++ b/subscription/models.py @@ -170,69 +170,3 @@ class Subscription(models.Model): self.subscription_start <= date.today() and date.today() <= self.subscription_end ) - - -def guy_test(date, duration=4): - print( - str(date) - + " - " - + str(duration) - + " -> " - + str(Subscription.compute_start(date, duration)) - ) - - -def bibou_test(duration, date=date.today()): - print( - str(date) - + " - " - + str(duration) - + " -> " - + str( - Subscription.compute_end( - duration, Subscription.compute_start(date, duration) - ) - ) - ) - - -def guy(): - guy_test(date(2015, 7, 11)) - guy_test(date(2015, 8, 11)) - guy_test(date(2015, 2, 17)) - guy_test(date(2015, 3, 17)) - guy_test(date(2015, 1, 11)) - guy_test(date(2015, 2, 11)) - guy_test(date(2015, 8, 17)) - guy_test(date(2015, 9, 17)) - print("=" * 80) - guy_test(date(2015, 7, 11), 1) - guy_test(date(2015, 8, 11), 2) - guy_test(date(2015, 2, 17), 3) - guy_test(date(2015, 3, 17), 4) - guy_test(date(2015, 1, 11), 1) - guy_test(date(2015, 2, 11), 2) - guy_test(date(2015, 8, 17), 3) - guy_test(date(2015, 9, 17), 4) - print("=" * 80) - bibou_test(1, date(2015, 2, 18)) - bibou_test(2, date(2015, 2, 18)) - bibou_test(3, date(2015, 2, 18)) - bibou_test(4, date(2015, 2, 18)) - bibou_test(1, date(2015, 9, 18)) - bibou_test(2, date(2015, 9, 18)) - bibou_test(3, date(2015, 9, 18)) - bibou_test(4, date(2015, 9, 18)) - print("=" * 80) - bibou_test(1, date(2000, 2, 29)) - bibou_test(2, date(2000, 2, 29)) - bibou_test(1, date(2000, 5, 31)) - bibou_test(1, date(2000, 7, 31)) - bibou_test(1) - bibou_test(2) - bibou_test(3) - bibou_test(4) - - -if __name__ == "__main__": - guy()