forked from CGM_Public/pretix_original
API: Fix test for deleting tax rules
This commit is contained in:
@@ -161,7 +161,7 @@ Endpoints
|
||||
.. http:patch:: /api/v1/organizers/(organizer)/events/(event)/taxrules/(id)/
|
||||
|
||||
Update a tax rule. You can also use ``PUT`` instead of ``PATCH``. With ``PUT``, you have to provide all fields of
|
||||
the resource, other fields will be resetted to defaukt. With ``PATCH``, you only need to provide the fields that you
|
||||
the resource, other fields will be resetted to default. With ``PATCH``, you only need to provide the fields that you
|
||||
want to change.
|
||||
|
||||
**Example request**:
|
||||
|
||||
@@ -74,8 +74,8 @@ def test_rule_delete(token_client, organizer, event, taxrule):
|
||||
resp = token_client.delete(
|
||||
'/api/v1/organizers/{}/events/{}/taxrules/{}/'.format(organizer.slug, event.slug, taxrule.pk),
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
assert not event.taxrules.exists()
|
||||
assert resp.status_code == 204
|
||||
assert not event.tax_rules.exists()
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@@ -85,4 +85,4 @@ def test_rule_delete_forbidden(token_client, organizer, event, taxrule):
|
||||
'/api/v1/organizers/{}/events/{}/taxrules/{}/'.format(organizer.slug, event.slug, taxrule.pk),
|
||||
)
|
||||
assert resp.status_code == 403
|
||||
assert event.taxrules.exists()
|
||||
assert event.tax_rules.exists()
|
||||
|
||||
Reference in New Issue
Block a user