[modules] Separate modules into core & contrib

Also, improve errors when importing a module fails.

Also, add more tests.
This commit is contained in:
Tobias Witek 2020-03-06 14:14:34 +01:00
parent 47950240d0
commit efc2e4f94e
15 changed files with 38 additions and 10 deletions

View file

@ -1,13 +1,13 @@
import unittest
import modules.kernel
import modules.core.kernel
class kernel(unittest.TestCase):
def setUp(self):
self.someKernel = 'this-is-my-kernel'
with unittest.mock.patch('modules.kernel.platform') as platform:
with unittest.mock.patch('modules.core.kernel.platform') as platform:
platform.release.return_value = self.someKernel
self.module = modules.kernel.Module()
self.module = modules.core.kernel.Module()
def test_full_text(self):
self.assertEqual(1, len(self.module.widgets()))