2015-01-25 00:34:14 +01:00
|
|
|
from django.test.client import Client
|
|
|
|
|
2015-06-29 12:08:15 +02:00
|
|
|
from openslides.core.config 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.
|
|
|
|
"""
|
2019-01-06 16:22:33 +01:00
|
|
|
|
2015-01-25 00:34:14 +01:00
|
|
|
def setUp(self):
|
|
|
|
self.client = Client()
|
2019-01-06 16:22:33 +01:00
|
|
|
config["general_system_enable_anonymous"] = True
|
2015-01-25 00:34:14 +01:00
|
|
|
|
|
|
|
def test_motion_detail(self):
|
2019-01-06 16:22:33 +01:00
|
|
|
Motion.objects.create(title="test_motion")
|
2015-01-25 00:34:14 +01:00
|
|
|
|
2019-01-06 16:22:33 +01:00
|
|
|
response = self.client.get("/motions/1/")
|
2015-01-25 00:34:14 +01:00
|
|
|
|
|
|
|
self.assertEqual(response.status_code, 200)
|