Ejemplo n.º 1
0
 def setUp(self):
     self.cache = AppCache()
Ejemplo n.º 2
0
from walkoff.appgateway.appcache import AppCache

_cache = AppCache()


def get_app(app_name):
    """Gets the app class for a given app from the global cache.

    Args:
        app_name (str): Name of the app to get

    Returns:
        (cls) The app's class

    Raises:
        UnknownApp: If app has only global actions or app is not found
    """
    return _cache.get_app(app_name)


def get_all_actions_for_app(app_name):
    """Gets all the names of the actions for a given app from the global cache

    Args:
        app_name (str): Name of the app

    Returns:
        (list[str]): The actions associated with the app

    Raises:
        UnknownApp: If the app is not found in the cache