OpenSlides/tests/integration/motions/test_views.py
Oskar Hahn 0b5f75339e Rename apps and permissions
* Fixed agenda permissions
* Renamed assignment to assignments, fixed assignments permission names
* Renamed mediafile to mediafiles
* Renamed motion to motions. Fixed motions permission names
2015-03-29 20:35:53 +02:00

22 lines
556 B
Python

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