OpenSlides/tests/integration/motions/test_views.py
Oskar Hahn fbf7d0e43d Remove old thinks not needed for the 2.0 release:
* django templates
* widgets
* views
* mppt
* main_menu
* projector 1.x api

Sorted all imports
Add a ending slash to each url with a redirect view
2015-06-16 17:07:39 +02:00

22 lines
556 B
Python

from django.test.client import Client
from openslides.config.api import config
from openslides.motions.models import Motion
from openslides.utils.test import TestCase
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('/motions/1/')
self.assertEqual(response.status_code, 200)