From 50877c37089b2de5e7714a3546b09baca32ea03c Mon Sep 17 00:00:00 2001 From: Alex Seeholzer Date: Fri, 13 Nov 2015 14:07:36 +0100 Subject: [PATCH] Trying to fix travis build error & more general test imports: all files with test_*.py are imported from the /tests directory; --- helpdesk/tests/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/helpdesk/tests/__init__.py b/helpdesk/tests/__init__.py index 74468831..abe2f37a 100644 --- a/helpdesk/tests/__init__.py +++ b/helpdesk/tests/__init__.py @@ -1,4 +1,6 @@ -from helpdesk.tests.test_ticket_submission import * -from helpdesk.tests.test_public_actions import * -from helpdesk.tests.test_navigation import * -from helpdesk.tests.test_per_queue_staff_membership import * +from os.path import dirname, basename, isfile +import glob + +# import all test_*.py files in directory +modules = glob.glob(dirname(__file__)+"/test_*.py") +__all__ = [basename(f)[:-3] for f in modules if isfile(f)]