Merge pull request #806 from normanjaeckel/Some_Issues

Some issues
This commit is contained in:
Oskar Hahn 2013-07-05 08:06:38 -07:00
commit 04e691ef7c
3 changed files with 42 additions and 8 deletions

View File

@ -26,7 +26,7 @@ I. Installation on GNU/Linux and MacOSX using the Python Package Index (PyPI)
E. g. for Ubuntu run:
$ sudo apt-get install python-dev
2. Setup a virtual environment with virtualenv (optional):
2. Setup a virtual environment with Virtual Python Environment builder (optional):
You can setup a virtual environment to install OpenSlides as
non-root user.
@ -117,7 +117,7 @@ III. Installation on GNU/Linux and MacOSX using the sources (for development)
$ sudo apt-get install git
$ git clone git://github.com/OpenSlides/OpenSlides.git
3. Setup a virtual environment with virtualenv (optional):
3. Setup a virtual environment with Virtual Python Environment builder (optional):
You can setup a virtual environment to install OpenSlides as
non-root user.
@ -176,21 +176,29 @@ portable version you should run the following install steps.
a) Download and run 32bit MSI installer from http://www.python.org/:
http://python.org/ftp/python/2.7.4/python-2.7.4.msi
http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi
b) Add python dirs to PATH (via Control Panel > System > Advanced):
";C:\Python27;C:\Python27\Scripts"
c) Download and run 32bit binary installer from http://pypi.python.org/pypi/setuptools:
Note that the path can differ if you customized the install of
Python in step a).
https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe
c) Download the install script ez_setup.py for Setuptools 0.7.7 from
https://pypi.python.org/pypi/setuptools/0.7.7#windows and run (via
double click).
2. Setup a virtual environment with virtualenv (optional):
2. Setup a virtual environment with Virtual Python Environment builder (optional):
You can setup a virtual environment to install OpenSlides as
non-root user.
To install Virtual Python Environment builder, open command line
(cmd) and run:
> easy_install https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz
To setup and activate the virtual environment, create your
OpenSlides directory, open command line (cmd), change to the
directory and run:
@ -202,7 +210,7 @@ portable version you should run the following install steps.
Run on command line (cmd):
> pip install openslides
> easy_install openslides
OpenSlides will install all required python packages.

View File

@ -121,7 +121,7 @@
{% endif %}
{% endif %}
{% if perms.assignment.can_manage_assignments and blocked_candidates and assignment.status != "fin" %}
{% if perms.assignment.can_manage_assignment and blocked_candidates and assignment.status != "fin" %}
<h4>{% trans "Blocked Candidates" %}</h4>
<ul>
{% for person in blocked_candidates %}

View File

@ -64,3 +64,29 @@ class TestAssignmentPollDelete(AssignmentViewTestCase):
def test_post(self):
response = self.admin_client.post('/assignment/poll/1/del/', {'yes': 1})
self.assertRedirects(response, '/assignment/1/')
class TestAssignmentDetailView(AssignmentViewTestCase):
def test_blocked_candidates_view(self):
"""
Tests that a delegate runs for a vote and then withdraws himself.
"""
response = self.staff_client.get('/assignment/1/')
self.assertContains(response, 'No candidates available.')
self.assertNotContains(response, 'Blocked Candidates')
response = self.delegate_client.get('/assignment/1/run/')
self.assertTrue(self.assignment1.is_candidate(self.delegate))
self.assertFalse(self.assignment1.is_blocked(self.delegate))
response = self.staff_client.get('/assignment/1/')
self.assertNotContains(response, 'No candidates available.')
self.assertNotContains(response, 'Blocked Candidates')
response = self.delegate_client.get('/assignment/1/delrun/')
self.assertFalse(self.assignment1.is_candidate(self.delegate))
self.assertTrue(self.assignment1.is_blocked(self.delegate))
response = self.staff_client.get('/assignment/1/')
self.assertContains(response, 'No candidates available.')
self.assertContains(response, 'Blocked Candidates')