2013-04-03 17:55:30 +02:00
|
|
|
|
#!/usr/bin/env python
|
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
"""
|
|
|
|
|
Tests for openslides.core.views
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
:copyright: 2011–2013 by OpenSlides team, see AUTHORS.
|
|
|
|
|
:license: GNU GPL, see LICENSE for more details.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from django.test.client import Client
|
|
|
|
|
|
|
|
|
|
from openslides import get_version
|
|
|
|
|
from openslides.participant.models import User
|
2013-09-25 10:01:01 +02:00
|
|
|
|
from openslides.utils.test import TestCase
|
2013-04-03 17:55:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VersionViewTest(TestCase):
|
|
|
|
|
def test_get(self):
|
2013-09-25 10:01:01 +02:00
|
|
|
|
User.objects.create_user('CoreMaximilian', 'xxx@xx.xx', 'default')
|
2013-04-03 17:55:30 +02:00
|
|
|
|
client = Client()
|
|
|
|
|
client.login(username='CoreMaximilian', password='default')
|
|
|
|
|
response = client.get('/version/')
|
|
|
|
|
self.assertContains(response, get_version(), status_code=200)
|