Skip to content

Commit ffa1628

Browse files
committed
fix(controller/web): enable unit tests
The minimal web pages in deis-controller are an optional feature that can't properly be removed from the code in a backward-compatible release, so they deserve to have their tests included again.
1 parent 2439338 commit ffa1628

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

controller/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ test-style: setup-venv
7878
shellcheck $(SHELL_SCRIPTS)
7979

8080
test-unit: setup-venv test-style
81-
venv/bin/coverage run manage.py test --noinput api
81+
venv/bin/coverage run manage.py test --noinput web api
8282
venv/bin/coverage report -m
8383

8484
test-functional:

controller/registry/tests.py

Whitespace-only changes.

controller/web/tests.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from __future__ import unicode_literals
88

9+
from django.conf import settings
910
from django.template import Context
1011
from django.template import Template
1112
from django.template import TemplateSyntaxError
@@ -16,6 +17,10 @@ class WebViewsTest(TestCase):
1617

1718
fixtures = ['test_web.json']
1819

20+
@classmethod
21+
def setUpClass(cls):
22+
settings.WEB_ENABLED = True
23+
1924
def setUp(self):
2025
self.client.login(username='autotest-1', password='password')
2126

0 commit comments

Comments
 (0)