From a5af188372aad2f37d8e308875cb3e52603b32d7 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Wed, 5 Apr 2017 14:21:27 +0100 Subject: [PATCH 1/2] Remove dodgy plugin update test This was always a bit dodge and didn't work before django 1.8 and now doesn't work in django 1.11. Plugin changes should require a server restart anyway --- cabot/cabotapp/tests/tests_basic.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cabot/cabotapp/tests/tests_basic.py b/cabot/cabotapp/tests/tests_basic.py index 16c9d54..a49ef4a 100644 --- a/cabot/cabotapp/tests/tests_basic.py +++ b/cabot/cabotapp/tests/tests_basic.py @@ -1043,16 +1043,6 @@ class TestAlerts(LocalTestCase): self.trigger_failing_check(self.critical_http_check) self.assertEqual(fake_send_alert.call_count, 2) - def test_update_plugins(self): - # Test that disabling a plugin is detected by update_alert_plugins - plugins = update_alert_plugins() - plugin_count = len(plugins) - new_apps = [s for s in settings.INSTALLED_APPS if s not in ['cabot_alert_hipchat']] - - with self.settings(INSTALLED_APPS=new_apps): - plugins = update_alert_plugins() - self.assertEqual(len(plugins), plugin_count - 1) - def test_update_profile_success(self): url = reverse('update-alert-user-data', kwargs={'pk':self.user.id, 'alerttype': 'General'}) self.client.login(username=self.username, password=self.password) From f99ef6d445924443d42cf4f572d318fcd05d8330 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Wed, 5 Apr 2017 14:21:58 +0100 Subject: [PATCH 2/2] Upgrade to django 1.11 This requires a bump in django filter which needs django_filters adding to INSTALLED_APPS --- CHANGES | 1 + Pipfile | 6 +++--- cabot/settings.py | 1 + requirements.txt | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index ff18e20..541969e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ 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 10810a4..ff32bed 100644 --- a/Pipfile +++ b/Pipfile @@ -7,7 +7,7 @@ amqp = ">=2.1.4" celery = ">=4,<5" djangorestframework = "*" django-jsonify = "*" -django-filter = "!=1.0.2" +django-filter = "*" django-auth-ldap = "*" anyjson = "*" dj-database-url = "*" @@ -20,10 +20,10 @@ python-dateutil = "*" pytz = "*" redis = "*" requests = "*" -twilio = "*" +twilio = ">=5,<6" whitenoise = "*" coreapi = "*" -Django = ">=1.10,<1.11" +Django = ">=1.11,<2" django_polymorphic = "*" django_compressor = "*" Markdown = "*" diff --git a/cabot/settings.py b/cabot/settings.py index 8909697..46c971b 100644 --- a/cabot/settings.py +++ b/cabot/settings.py @@ -139,6 +139,7 @@ INSTALLED_APPS = ( 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', + 'django_filters', 'compressor', 'polymorphic', 'jsonify', diff --git a/requirements.txt b/requirements.txt index c1e608b..b35701f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,11 +6,11 @@ celery==4.0.2 coreapi==2.3.0 coreschema==0.0.4 dj-database-url==0.4.2 -Django==1.10.6 +Django==1.11 django-appconf==1.0.2 django-auth-ldap==1.2.10 django-compressor==2.1.1 -django-filter==1.0.1 # rq.filter: !=1.0.2 +django-filter==1.0.2 django-jsonify==0.3.0 django-polymorphic==1.1 djangorestframework==3.6.2 @@ -21,7 +21,7 @@ gunicorn==19.7.1 httplib2==0.10.3 icalendar==3.11.3 itypes==1.1.0 -Jinja2==2.9.5 +Jinja2==2.9.6 kombu==4.0.2 Markdown==2.6.8 MarkupSafe==1.0