From f3bbc11dbd2359bb4cde7e2b6d01520f3f66f35e Mon Sep 17 00:00:00 2001 From: helgi Date: Thu, 28 Jul 2016 19:38:56 -0700 Subject: [PATCH] fix(app): add verbose_name to App model due to a DRF 3.4.1 fix https://github.com/tomchristie/django-rest-framework/pull/4299 --- rootfs/api/models/app.py | 1 + rootfs/api/tests/deployments/test_app.py | 2 +- rootfs/api/tests/test_app.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rootfs/api/models/app.py b/rootfs/api/models/app.py index 083c90ce0..98b3fbd9d 100644 --- a/rootfs/api/models/app.py +++ b/rootfs/api/models/app.py @@ -86,6 +86,7 @@ class App(UuidAuditedModel): structure = JSONField(default={}, blank=True, validators=[validate_app_structure]) class Meta: + verbose_name = 'Application' permissions = (('use_app', 'Can use app'),) ordering = ['id'] diff --git a/rootfs/api/tests/deployments/test_app.py b/rootfs/api/tests/deployments/test_app.py index 6047b2a74..f6ad46a15 100644 --- a/rootfs/api/tests/deployments/test_app.py +++ b/rootfs/api/tests/deployments/test_app.py @@ -88,7 +88,7 @@ def test_app_override_id(self, mock_requests): self.assertEqual(response.status_code, 201, response.data) body = {'id': response.data['id']} response = self.client.post('/v2/apps', body) - self.assertContains(response, 'App with this id already exists.', status_code=400) + self.assertContains(response, 'Application with this id already exists.', status_code=400) return response @mock.patch('requests.get') diff --git a/rootfs/api/tests/test_app.py b/rootfs/api/tests/test_app.py index 7185471b2..bac084092 100644 --- a/rootfs/api/tests/test_app.py +++ b/rootfs/api/tests/test_app.py @@ -86,7 +86,7 @@ def test_app_override_id(self, mock_requests): self.assertEqual(response.status_code, 201, response.data) body = {'id': response.data['id']} response = self.client.post('/v2/apps', body) - self.assertContains(response, 'App with this id already exists.', status_code=400) + self.assertContains(response, 'Application with this id already exists.', status_code=400) return response @mock.patch('requests.get')