Feature/support django 1 10 (#139)

* topic.poll fix test

* update requirements

* travis test env django 1.8, 1.9 and 1.10

* readme add django 1.10

* history add support django 1.10

* coveragerc omit migrations runtests and setup
This commit is contained in:
Esteban Castro Borsani 2016-11-14 00:48:35 -03:00 committed by GitHub
parent 868250526a
commit 4c8fbac155
6 changed files with 19 additions and 10 deletions

6
.coveragerc Normal file
View File

@ -0,0 +1,6 @@
[report]
omit =
runtests.py
setup.py
*/migrations/*
*settings*

View File

@ -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

View File

@ -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
==================

View File

@ -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)

View File

@ -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

View File

@ -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, {})