From e7d2d0ddabe28331fafe3c2bc97dda16ad6f04fd Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 10 Dec 2020 18:10:45 +0100 Subject: [PATCH] Adjust tests broken by 0a55fdbc4 --- src/tests/presale/test_widget.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/tests/presale/test_widget.py b/src/tests/presale/test_widget.py index 07b812600..b59e93a7d 100644 --- a/src/tests/presale/test_widget.py +++ b/src/tests/presale/test_widget.py @@ -494,9 +494,9 @@ class WidgetCartTest(CartTestMixin, TestCase): 'list_type': 'list', 'poweredby': 'event ticketing powered by pretix', 'events': [ - {'name': 'Present', 'date_range': 'Jan. 1, 2019 11:00', 'availability': {'color': 'green', 'text': 'Book now', 'reason': 'ok'}, + {'name': 'Present', 'date_range': 'Jan. 1, 2019 11:00', 'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'event_url': 'http://example.com/ccc/30c3/', 'subevent': se1.pk, 'location': ''}, - {'name': 'Future', 'date_range': 'Jan. 4, 2019 11:00', 'availability': {'color': 'green', 'text': 'Book now', 'reason': 'ok'}, + {'name': 'Future', 'date_range': 'Jan. 4, 2019 11:00', 'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'event_url': 'http://example.com/ccc/30c3/', 'subevent': se2.pk, 'location': ''} ] } @@ -526,14 +526,14 @@ class WidgetCartTest(CartTestMixin, TestCase): {'day': 1, 'date': '2019-01-01', 'events': [ {'name': 'Present', 'time': '11:00', 'continued': False, 'date_range': 'Jan. 1, 2019 11:00', 'location': '', - 'availability': {'color': 'green', 'text': 'Book now', 'reason': 'ok'}, + 'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'event_url': 'http://example.com/ccc/30c3/', 'subevent': se1.pk}]}, {'day': 2, 'date': '2019-01-02', 'events': []}, {'day': 3, 'date': '2019-01-03', 'events': []}, {'day': 4, 'date': '2019-01-04', 'events': [ {'name': 'Future', 'time': '11:00', 'continued': False, 'date_range': 'Jan. 4, 2019 11:00', 'location': '', - 'availability': {'color': 'green', 'text': 'Book now', 'reason': 'ok'}, + 'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'event_url': 'http://example.com/ccc/30c3/', 'subevent': se2.pk}]}, {'day': 5, 'date': '2019-01-05', 'events': []}, {'day': 6, 'date': '2019-01-06', 'events': []} @@ -599,14 +599,14 @@ class WidgetCartTest(CartTestMixin, TestCase): {'day_formatted': 'Tue, Jan 1st', 'date': '2019-01-01', 'events': [ {'name': 'Present', 'time': '11:00', 'continued': False, 'date_range': 'Jan. 1, 2019 11:00', 'location': '', - 'availability': {'color': 'green', 'text': 'Book now', 'reason': 'ok'}, + 'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'event_url': 'http://example.com/ccc/30c3/', 'subevent': se1.pk}], 'today': True}, {'day_formatted': 'Wed, Jan 2nd', 'date': '2019-01-02', 'events': [], 'today': False}, {'day_formatted': 'Thu, Jan 3rd', 'date': '2019-01-03', 'events': [], 'today': False}, {'day_formatted': 'Fri, Jan 4th', 'date': '2019-01-04', 'events': [ {'name': 'Future', 'time': '11:00', 'continued': False, 'date_range': 'Jan. 4, 2019 11:00', 'location': '', - 'availability': {'color': 'green', 'text': 'Book now', 'reason': 'ok'}, + 'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'event_url': 'http://example.com/ccc/30c3/', 'subevent': se2.pk}], 'today': False}, {'day_formatted': 'Sat, Jan 5th', 'date': '2019-01-05', 'events': [], 'today': False}, {'day_formatted': 'Sun, Jan 6th', 'date': '2019-01-06', 'events': [], 'today': False} @@ -641,12 +641,12 @@ class WidgetCartTest(CartTestMixin, TestCase): 'event_url': 'http://example.com/ccc/30c3/', 'location': '', 'name': '30C3'}, - {'availability': {'color': 'green', 'text': 'Book now', 'reason': 'ok'}, + {'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'date_range': 'Jan. 1, 2019 10:00', 'location': '', 'event_url': 'http://example.com/ccc/present/', 'name': 'Present'}, - {'availability': {'color': 'green', 'text': 'Book now', 'reason': 'ok'}, + {'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'date_range': 'Jan. 4, 2019 10:00', 'location': '', 'event_url': 'http://example.com/ccc/future/', @@ -683,8 +683,7 @@ class WidgetCartTest(CartTestMixin, TestCase): [None, {'date': '2019-01-01', 'day': 1, - 'events': [{'availability': {'color': 'green', - 'text': 'Book now', 'reason': 'ok'}, + 'events': [{'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'continued': False, 'date_range': 'Jan. 1, 2019 10:00', 'event_url': 'http://example.com/ccc/present/', @@ -692,8 +691,7 @@ class WidgetCartTest(CartTestMixin, TestCase): 'location': '', 'subevent': None, 'time': '10:00'}, - {'availability': {'color': 'green', - 'text': 'Book now', 'reason': 'ok'}, + {'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'continued': False, 'date_range': 'Jan. 1, 2019 11:00', 'event_url': 'http://example.com/ccc/30c3/', @@ -705,8 +703,7 @@ class WidgetCartTest(CartTestMixin, TestCase): {'date': '2019-01-03', 'day': 3, 'events': []}, {'date': '2019-01-04', 'day': 4, - 'events': [{'availability': {'color': 'green', - 'text': 'Book now', 'reason': 'ok'}, + 'events': [{'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'continued': False, 'date_range': 'Jan. 4, 2019 10:00', 'event_url': 'http://example.com/ccc/future/', @@ -714,8 +711,7 @@ class WidgetCartTest(CartTestMixin, TestCase): 'location': '', 'subevent': None, 'time': '10:00'}, - {'availability': {'color': 'green', - 'text': 'Book now', 'reason': 'ok'}, + {'availability': {'color': 'none', 'text': '', 'reason': 'unknown'}, 'continued': False, 'date_range': 'Jan. 4, 2019 11:00', 'event_url': 'http://example.com/ccc/30c3/',