OpenSlides/tests/integration/motion/test_views.py

22 lines
554 B
Python
Raw Normal View History

from django.test.client import Client
from openslides.utils.test import TestCase
from openslides.motion.models import Motion
from openslides.config.api import config
class AnonymousRequests(TestCase):
"""
Tests requests from the anonymous user.
"""
def setUp(self):
self.client = Client()
config['system_enable_anonymous'] = True
def test_motion_detail(self):
Motion.objects.create(title='test_motion')
response = self.client.get('/motion/1/')
self.assertEqual(response.status_code, 200)