diff --git a/tests/__init__.py b/tests/__init__.py index 9867da1..e305a74 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -11,20 +11,18 @@ import unittest -from .test_db import DbTestCase +import base +import managers -from .test_manager_folder import FolderManagerTestCase -from .test_manager_user import UserManagerTestCase from .test_api import ApiTestCase from .test_frontend import FrontendTestCase def suite(): suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(DbTestCase)) + suite.addTest(base.suite()) - suite.addTest(unittest.makeSuite(FolderManagerTestCase)) - suite.addTest(unittest.makeSuite(UserManagerTestCase)) + suite.addTest(managers.suite()) suite.addTest(unittest.makeSuite(ApiTestCase)) suite.addTest(unittest.makeSuite(FrontendTestCase)) diff --git a/tests/base/__init__.py b/tests/base/__init__.py new file mode 100644 index 0000000..0012e0c --- /dev/null +++ b/tests/base/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# vim:fenc=utf-8 +# +# This file is part of Supysonic. +# Supysonic is a Python implementation of the Subsonic server API. +# +# Copyright (C) 2017 Alban 'spl0k' Féron +# +# Distributed under terms of the GNU AGPLv3 license. + +import unittest + +from .test_db import DbTestCase + +def suite(): + suite = unittest.TestSuite() + + suite.addTest(unittest.makeSuite(DbTestCase)) + + return suite + diff --git a/tests/test_db.py b/tests/base/test_db.py similarity index 100% rename from tests/test_db.py rename to tests/base/test_db.py diff --git a/tests/managers/__init__.py b/tests/managers/__init__.py new file mode 100644 index 0000000..e7c4bfd --- /dev/null +++ b/tests/managers/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# vim:fenc=utf-8 +# +# This file is part of Supysonic. +# Supysonic is a Python implementation of the Subsonic server API. +# +# Copyright (C) 2017 Alban 'spl0k' Féron +# 2017 Óscar García Amor +# +# Distributed under terms of the GNU AGPLv3 license. + +import unittest + +from .test_manager_folder import FolderManagerTestCase +from .test_manager_user import UserManagerTestCase + +def suite(): + suite = unittest.TestSuite() + + suite.addTest(unittest.makeSuite(FolderManagerTestCase)) + suite.addTest(unittest.makeSuite(UserManagerTestCase)) + + return suite + diff --git a/tests/test_manager_folder.py b/tests/managers/test_manager_folder.py similarity index 100% rename from tests/test_manager_folder.py rename to tests/managers/test_manager_folder.py diff --git a/tests/test_manager_user.py b/tests/managers/test_manager_user.py similarity index 100% rename from tests/test_manager_user.py rename to tests/managers/test_manager_user.py