mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +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
21 lines
528 B
Python
21 lines
528 B
Python
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
|