Merge pull request #489 from arachnys/fix-polymorphic-bug

Rollback to Django 1.10
This commit is contained in:
Frank Hamand 2017-04-17 12:18:36 +01:00 committed by GitHub
commit 24b5f1ca0a
4 changed files with 10 additions and 4 deletions

View File

@ -1,7 +1,6 @@
master
------
* Upgrade to Django 1.11
* Allow user filter for LDAP to be configured
- Set the AUTH_LDAP_USER_FILTER setting to change it (defaults to "(uid=%(user)s)")
* Update cabot-alert-hipchat plugin to 2.0.2

View File

@ -23,7 +23,7 @@ requests = "*"
twilio = ">=5,<6"
whitenoise = "*"
coreapi = "*"
Django = ">=1.11,<2"
Django = ">=1.10,<1.11"
django_polymorphic = "*"
django_compressor = "*"
Markdown = "*"

View File

@ -8,7 +8,7 @@ from datetime import timedelta, date
import os
import requests
from cabot.cabotapp.graphite import parse_metric
from cabot.cabotapp.alert import update_alert_plugins
from cabot.cabotapp.alert import update_alert_plugins, AlertPlugin
from cabot.cabotapp.models import (
GraphiteStatusCheck, JenkinsStatusCheck,
HttpStatusCheck, ICMPStatusCheck, Service, Instance,
@ -197,6 +197,13 @@ def throws_timeout(*args, **kwargs):
raise requests.RequestException(u'фиктивная ошибка innit')
class TestPolymorphic(LocalTestCase):
def test_polymorphic(self):
plugin = AlertPlugin.objects.first()
self.assertIn(type(plugin), AlertPlugin.__subclasses__())
class TestCheckRun(LocalTestCase):
def test_calculate_service_status(self):

View File

@ -6,7 +6,7 @@ celery==4.0.2
coreapi==2.3.0
coreschema==0.0.4
dj-database-url==0.4.2
Django==1.11
Django==1.10.7
django-appconf==1.0.2
django-auth-ldap==1.2.10
django-compressor==2.1.1