<s> from django . test . client import Client <EOL> from openslides . assignments . models import Assignment <EOL> from openslides . users . models import User <EOL> from openslides . utils . test import TestCase <EOL> class AssignmentPDFTest ( TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> self . admin = User . objects . get ( pk = <NUM_LIT:1> ) <EOL> self . admin_client = Client ( ) <EOL> self . admin_client . login ( username = '<STR_LIT>' , password = '<STR_LIT>' ) <EOL> def test_render_pdf ( self ) : <EOL> Assignment . objects . create ( title = '<STR_LIT>' , description = "<STR_LIT:test>" , open_posts = <NUM_LIT:1> ) <EOL> response = self . admin_client . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( response . status_code , <NUM_LIT:200> ) <EOL> def test_render_many_posts ( self ) : <EOL> Assignment . objects . create ( title = '<STR_LIT>' , description = "<STR_LIT:test>" , open_posts = <NUM_LIT:20> ) <EOL> response = self . admin_client . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( response . status_code , <NUM_LIT:200> ) </s>
