2015-01-25 00:34:14 +01:00
|
|
|
from django.test.client import Client
|
|
|
|
|
|
|
|
from openslides.config.api import config
|
2015-06-16 10:37:23 +02:00
|
|
|
from openslides.motions.models import Motion
|
|
|
|
from openslides.utils.test import TestCase
|
2015-01-25 00:34:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
class AnonymousRequests(TestCase):
|
|
|
|
"""
|
|
|
|
Tests requests from the anonymous user.
|
|
|
|
"""
|
|
|
|
def setUp(self):
|
|
|
|
self.client = Client()
|
2015-06-16 18:12:59 +02:00
|
|
|
config['general_system_enable_anonymous'] = True
|
2015-01-25 00:34:14 +01:00
|
|
|
|
|
|
|
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)
|