Exemple #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
def _NamespaceKey(key, namespace=None):
  if not namespace:
    namespace = datastore_hooks.GetNamespace()
  return '%s__%s' % (namespace, key)
Exemple #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)