Exemplo n.º 1
0
def FetchCachedTestSuites():
    """Fetches cached test suite data."""
    cached = namespaced_stored_object.Get(_LIST_SUITES_CACHE_KEY)
    if cached is None:
        # If the cache test suite list is not set, update it before fetching.
        # This is for convenience when testing sending of data to a local instance.
        UpdateTestSuites(datastore_hooks.GetNamespace())
        cached = namespaced_stored_object.Get(_LIST_SUITES_CACHE_KEY)
    return cached
Exemplo n.º 2
0
def _NamespaceKey(key, namespace=None):
  if not namespace:
    namespace = datastore_hooks.GetNamespace()
  return '%s__%s' % (namespace, key)
Exemplo n.º 3
0
def NamespaceKey(key, namespace=None):
    """Prepends a namespace string to a key string."""
    if not namespace:
        namespace = datastore_hooks.GetNamespace()
    return '%s__%s' % (namespace, key)