Skip to content
Snippets Groups Projects
Commit bdd04072 authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

update sams_hub.py to pass test_menu_list_provided

parent 349a7210
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,11 @@ from importlib import import_module
#from importlib import import_module
from .sams_app import SAMSApp
from .exceptions import FunctionNotExists
from optparse import Values
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
class SAMSHub:
......@@ -60,9 +65,16 @@ class SAMSHub:
'app_lang': self.app(request.blueprint).lang(
session.get('language', self._config['default_language'])
),
'menu_list': self._menu_list()
'menu': self.menu(
session.get('language', self._config['default_language']))
}
def menu(self, langCode):
menu = []
for app in self._apps.values():
menu.extend(app.menu(langCode))
return menu
@staticmethod
def _get_module_rule(module, path):
pathElements = [module]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment