diff --git a/CHANGES b/CHANGES index 541969e..ff18e20 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/Pipfile b/Pipfile index ff32bed..9820cda 100644 --- a/Pipfile +++ b/Pipfile @@ -23,7 +23,7 @@ requests = "*" twilio = ">=5,<6" whitenoise = "*" coreapi = "*" -Django = ">=1.11,<2" +Django = ">=1.10,<1.11" django_polymorphic = "*" django_compressor = "*" Markdown = "*" diff --git a/cabot/cabotapp/tests/tests_basic.py b/cabot/cabotapp/tests/tests_basic.py index a49ef4a..c83a7da 100644 --- a/cabot/cabotapp/tests/tests_basic.py +++ b/cabot/cabotapp/tests/tests_basic.py @@ -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): diff --git a/requirements.txt b/requirements.txt index b35701f..001160c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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