mirror of
https://github.com/pretix/pretix.git
synced 2026-08-16 11:46:27 +00:00
Adjust test to internal type change
This commit is contained in:
@@ -31,10 +31,10 @@ class PluginsField(Field):
|
||||
def to_representation(self, obj):
|
||||
from pretix.base.plugins import get_all_plugins
|
||||
|
||||
return [
|
||||
return sorted([
|
||||
p.module for p in get_all_plugins()
|
||||
if not p.name.startswith('.') and getattr(p, 'visible', True) and p.module in obj.get_plugins()
|
||||
]
|
||||
])
|
||||
|
||||
def to_internal_value(self, data):
|
||||
return {
|
||||
|
||||
@@ -89,10 +89,10 @@ TEST_EVENT_RES = {
|
||||
"slug": "dummy",
|
||||
"has_subevents": False,
|
||||
"meta_data": {"type": "Conference"},
|
||||
'plugins': {
|
||||
'plugins': [
|
||||
'pretix.plugins.banktransfer',
|
||||
'pretix.plugins.ticketoutputpdf'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -573,7 +573,7 @@ def test_event_update_plugins(token_client, organizer, event, free_item, free_qu
|
||||
format='json'
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
assert resp.data.get('plugins') == {
|
||||
assert set(resp.data.get('plugins')) == {
|
||||
"pretix.plugins.ticketoutputpdf",
|
||||
"pretix.plugins.pretixdroid"
|
||||
}
|
||||
@@ -588,9 +588,9 @@ def test_event_update_plugins(token_client, organizer, event, free_item, free_qu
|
||||
format='json'
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
assert resp.data.get('plugins') == {
|
||||
assert resp.data.get('plugins') == [
|
||||
"pretix.plugins.banktransfer"
|
||||
}
|
||||
]
|
||||
|
||||
resp = token_client.patch(
|
||||
'/api/v1/organizers/{}/events/{}/'.format(organizer.slug, event.slug),
|
||||
|
||||
Reference in New Issue
Block a user