OpenSlides/tests/assignment/test_pdf.py
Oskar Hahn 3527b0a75b Refactory of the participant app
* New user model (used Django's AbstractBaseUser)
* Renamed the app to users
* removed person api

See #861

Fixed #576 #478
2014-10-12 10:06:54 +02:00

22 lines
699 B
Python

from django.test.client import Client
from openslides.assignment.models import Assignment
from openslides.users.models import User
from openslides.utils.test import TestCase
class AssignmentPDFTest(TestCase):
"""
Tests for assignment PDF.
"""
def setUp(self):
# Admin
self.admin = User.objects.get(pk=1)
self.admin_client = Client()
self.admin_client.login(username='admin', password='admin')
def test_render_pdf(self):
Assignment.objects.create(name='assignment_name_ith8qua1Eiferoqu5ju2', description="test", posts=1)
response = self.admin_client.get('/assignment/print/')
self.assertEqual(response.status_code, 200)