2
# Ubuntu Continuous Integration Engine
3
# Copyright 2013 Canonical Ltd.
5
# This program is free software: you can redistribute it and/or modify it
6
# under the terms of the GNU Affero General Public License version 3, as
7
# published by the Free Software Foundation.
9
# This program is distributed in the hope that it will be useful, but
10
# WITHOUT ANY WARRANTY; without even the implied warranties of
11
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12
# PURPOSE. See the GNU Affero General Public License for more details.
14
# You should have received a copy of the GNU Affero General Public License
15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
from django.test.simple import DjangoTestSuiteRunner
18
from django.conf import settings
21
class LocalAppsTestSuiteRunner(DjangoTestSuiteRunner):
22
""" Override the default 'test' command to only run local tests. """
24
def run_tests(self, test_labels, *args, **kwargs):
26
test_labels = settings.LOCAL_APPS
28
return super(LocalAppsTestSuiteRunner, self).run_tests(
29
test_labels, *args, **kwargs)