diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..416a1823 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,6 @@ +[report] +omit = + runtests.py + setup.py + */migrations/* + *settings* diff --git a/.travis.yml b/.travis.yml index b97737ce..0cfa4271 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,14 @@ python: - "2.7" - "3.4" - "3.5" - +env: + - DJANGO=1.8.16 + - DJANGO=1.9.11 + - DJANGO=1.10.3 install: - pip install --upgrade pip - pip install -r requirements.txt + - pip install -q Django==$DJANGO - pip install coveralls pep8==1.5.7 flake8 script: - flake8 --exit-zero diff --git a/HISTORY.md b/HISTORY.md index bc3e23e7..d1ee3057 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,7 +2,7 @@ ================== * Drops support for Python 3.3 -* Adds support for Django 1.9 +* Adds support for Django 1.9 and 1.10 0.4.8 ================== diff --git a/README.md b/README.md index 290ed5cf..c153b790 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ To see it in action, please visit [The Spirit Project](http://spirit-project.com ## Compatibility * Python 2.7, 3.4 and 3.5 (recommended) -* Django 1.8 LTS (recommended) and 1.9 +* Django 1.8 LTS (recommended), 1.9 and 1.10 * PostgreSQL (recommended), MySQL, Oracle Database and SQLite ## Installing (Advanced) diff --git a/requirements.txt b/requirements.txt index 7ffb389b..32dbd565 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ -Django>=1.8,<1.10 -django-haystack==2.5.0 +Django>=1.8,<1.11 +django-haystack==2.5.1 whoosh==2.7.0 mistune==0.7.1 Pillow==3.1.0 -django-infinite-scroll-pagination>=0.1.3,<0.2 -django-djconfig>=0.5.0,<0.6 +django-infinite-scroll-pagination>=0.2.0,<0.3 +django-djconfig>=0.5.1,<0.6 unicode-slugify==0.1.3 pytz diff --git a/spirit/topic/poll/tests.py b/spirit/topic/poll/tests.py index 403c479d..fef30fc0 100644 --- a/spirit/topic/poll/tests.py +++ b/spirit/topic/poll/tests.py @@ -6,6 +6,7 @@ from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model from django.template import Template, Context +from django.contrib.auth.models import AnonymousUser from ...core.tests import utils from .models import TopicPoll, TopicPollChoice, TopicPollVote @@ -478,10 +479,8 @@ class TopicPollTemplateTagsTest(TestCase): poll_choice = TopicPollChoice.objects.create(poll=self.poll, description="op2") TopicPollVote.objects.create(user=self.user, choice=poll_choice) - self.user.is_authenticated = lambda: True context = render_poll_form(self.topic, self.user) self.assertDictEqual(context['form'].initial, {'choices': poll_choice}) - self.user.is_authenticated = lambda: False - context = render_poll_form(self.topic, self.user) + context = render_poll_form(self.topic, AnonymousUser()) self.assertDictEqual(context['form'].initial, {})