mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
* initial commit * API auth * Hierarchical URLs * Add session auth * Strong hierarchy * Add filters * Add i18n fields, questions * More viewsets and serializers * Ticket download * Add OrderPosition serializer * View-level permissions * More tests * More tests * Add basic API docs * Add REST API to docs frontpage * Tests for order endpoints * Add invoice tests * Voucher and waitinglist tests * Doc draft * order docs * Docs on all viewsets * Disable DRF docs, style sphinx, style browsable API * Fix tests * deprecated imports * Test foo * Attendee names * Fix migration problems * Remove browsable API, plugin integration * Doc fixes
This commit is contained in:
20
src/tests/api/test_organizers.py
Normal file
20
src/tests/api/test_organizers.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import pytest
|
||||
|
||||
TEST_ORGANIZER_RES = {
|
||||
"name": "Dummy",
|
||||
"slug": "dummy"
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_organizer_list(token_client, organizer):
|
||||
resp = token_client.get('/api/v1/organizers/')
|
||||
assert resp.status_code == 200
|
||||
assert TEST_ORGANIZER_RES in resp.data['results']
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_organizer_detail(token_client, organizer):
|
||||
resp = token_client.get('/api/v1/organizers/{}/'.format(organizer.slug))
|
||||
assert resp.status_code == 200
|
||||
assert TEST_ORGANIZER_RES == resp.data
|
||||
Reference in New Issue
Block a user