From 39abf636983993afe7c820b4b671ccbc1204976d Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 2 Feb 2018 10:16:23 +0100 Subject: [PATCH] Additional fixes --- doc/api/resources/item_add-ons.rst | 2 +- doc/api/resources/item_variations.rst | 2 +- doc/spelling_wordlist.txt | 1 + doc/user/events/display.rst | 2 +- doc/user/events/email.rst | 4 ++-- src/tests/api/test_items.py | 9 ++++++--- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/doc/api/resources/item_add-ons.rst b/doc/api/resources/item_add-ons.rst index 2e861dafdd..78417220b2 100644 --- a/doc/api/resources/item_add-ons.rst +++ b/doc/api/resources/item_add-ons.rst @@ -1,5 +1,5 @@ Item add-ons -===== +============ Resource description -------------------- diff --git a/doc/api/resources/item_variations.rst b/doc/api/resources/item_variations.rst index 546f2a006b..24f0edf86a 100644 --- a/doc/api/resources/item_variations.rst +++ b/doc/api/resources/item_variations.rst @@ -1,5 +1,5 @@ Item variations -===== +=============== Resource description -------------------- diff --git a/doc/spelling_wordlist.txt b/doc/spelling_wordlist.txt index 76aef2d498..d2b9a1558e 100644 --- a/doc/spelling_wordlist.txt +++ b/doc/spelling_wordlist.txt @@ -101,6 +101,7 @@ unprefixed untrusted username url +versa viewset viewsets webhook diff --git a/doc/user/events/display.rst b/doc/user/events/display.rst index 88386d4051..2f15496af5 100644 --- a/doc/user/events/display.rst +++ b/doc/user/events/display.rst @@ -8,7 +8,7 @@ The settings at "Settings" → "Display" allow you to customize the appearance o :class: screenshot The upper part of the page contains settings that you always need to set specifically for your event. Those are -currently:: +currently: Logo image This logo will be shown as a banner above your shop. If you set it, the event name and date will no longer be diff --git a/doc/user/events/email.rst b/doc/user/events/email.rst index 6b5dc1a62c..017034e32a 100644 --- a/doc/user/events/email.rst +++ b/doc/user/events/email.rst @@ -15,7 +15,7 @@ E-mail settings --------------- The upper part of the page contains settings that are relevant for the generation of all e-mails alike. Those are -currently:: +currently: Subject prefix This text will be prepended to the subject of all e-mails that are related to your event. For example, if you @@ -126,4 +126,4 @@ With the checkbox "Use custom SMTP server" you can turn using your SMTP server o button "Save and test custom SMTP connection", you can test if the connection and authentication to your SMTP server succeeds, even before turning that checkbox on. -.. _Sender Policy Framework: https://en.wikipedia.org/wiki/Sender_Policy_Framework \ No newline at end of file +.. _Sender Policy Framework: https://en.wikipedia.org/wiki/Sender_Policy_Framework diff --git a/src/tests/api/test_items.py b/src/tests/api/test_items.py index 610d1c0669..86e39701a3 100644 --- a/src/tests/api/test_items.py +++ b/src/tests/api/test_items.py @@ -509,12 +509,15 @@ def test_item_create_with_addon(token_client, organizer, event, item, category, format='json' ) assert resp.status_code == 400 - assert resp.content.decode() == '{"addons":["The minimum count needs to be equal to or greater than zero."]}' + assert resp.content.decode() in [ + '{"addons":["The minimum count needs to be equal to or greater than zero."]}', + '{"addons":[{"min_count":["Ensure this value is greater than or equal to 0."]}]}', # mysql + ] assert 2 == Item.objects.all().count() @pytest.mark.django_db -def test_item_update(token_client, organizer, event, item, category2, taxrule2): +def test_item_update(token_client, organizer, event, item, category, category2, taxrule2): resp = token_client.patch( '/api/v1/organizers/{}/events/{}/items/{}/'.format(organizer.slug, event.slug, item.pk), { @@ -564,7 +567,7 @@ def test_item_update(token_client, organizer, event, item, category2, taxrule2): { "addons": [ { - "addon_category": 1, + "addon_category": category.pk, "min_count": 0, "max_count": 10, "position": 0,