2015-01-25 00:34:14 +01:00
|
|
|
from django.test.client import Client
|
|
|
|
|
|
|
|
from openslides.utils.test import TestCase
|
2015-03-26 05:36:10 +01:00
|
|
|
from openslides.motions.models import Motion
|
2015-01-25 00:34:14 +01:00
|
|
|
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')
|
|
|
|
|
2015-03-26 05:36:10 +01:00
|
|
|
response = self.client.get('/motions/1/')
|
2015-01-25 00:34:14 +01:00
|
|
|
|
|
|
|
self.assertEqual(response.status_code, 200)
|