OpenSlides/tests/integration/motions/test_views.py

23 lines
566 B
Python
Raw Normal View History

from django.test.client import Client
2015-06-29 12:08:15 +02:00
from openslides.core.config import config
from openslides.motions.models import Motion
from openslides.utils.test import TestCase
class AnonymousRequests(TestCase):
"""
Tests requests from the anonymous user.
"""
2019-01-06 16:22:33 +01:00
def setUp(self):
self.client = Client()
2019-01-06 16:22:33 +01:00
config["general_system_enable_anonymous"] = True
def test_motion_detail(self):
2019-01-06 16:22:33 +01:00
Motion.objects.create(title="test_motion")
2019-01-06 16:22:33 +01:00
response = self.client.get("/motions/1/")
self.assertEqual(response.status_code, 200)