Example #1
0
def force_cache_only():
    if is_in_test():
        return config.LPCM_TEST_USE_LOCAL_CACHE_ONLY
    if settings.DEBUG:
        return config.LPCM_DEBUG_USE_LOCAL_CACHE_ONLY
    return False
Example #2
0
 def bind(cls):
   assert is_in_test(), "Should only call this in a test thread"
   LPCMSignal.post_update.connect(receiver = on_map_update)
Example #3
0
def on_map_update(sender, **kwargs):
  if not is_in_test():
    return
  map_name = kwargs['map_name']
  LPCMCleanUp.add_map_record(map_class = sender, map_name = map_name)
Example #4
0
def on_map_update(sender, **kwargs):
    if not is_in_test():
        return
    map_name = kwargs['map_name']
    LPCMCleanUp.add_map_record(map_class=sender, map_name=map_name)
Example #5
0
 def bind(cls):
     assert is_in_test(), "Should only call this in a test thread"
     LPCMSignal.post_update.connect(receiver=on_map_update)
Example #6
0
 def _get_ddb_hash_key(self, map_name):
     hash_key = map_name
     if is_in_test():
         hash_key = u"__test_{hash_key}".format(hash_key=hash_key)
     return hash_key
Example #7
0
 def _get_ddb_hash_key(self, map_name):
   hash_key = map_name
   if is_in_test():
     hash_key = u"__test_{hash_key}".format(hash_key = hash_key)
   return hash_key
Example #8
0
def force_cache_only():
  if is_in_test():
    return config.LPCM_TEST_USE_LOCAL_CACHE_ONLY
  if settings.DEBUG:
    return config.LPCM_DEBUG_USE_LOCAL_CACHE_ONLY
  return False