def copy_test_to_media(module, name):
 mezzanine_path = path_for_import(module)
 test_path = os.path.join(mezzanine_path, u'static', u'test', name)
 to_path = os.path.join(settings.MEDIA_ROOT, name)
 to_dir = os.path.dirname(to_path)
 if (not os.path.exists(to_dir)):
  os.makedirs(to_dir)
 if os.path.isdir(test_path):
  copy = copytree
 else:
  copy = copyfile
 try:
  copy(test_path, to_path)
 except OSError:
  pass

def copy_test_to_media ( module , name ) : mezzanine_path = path_for_import ( module ) test_path = os . path . join ( mezzanine_path , u'static' , u'test' , name ) to_path = os . path . join ( settings . MEDIA_ROOT , name ) to_dir = os . path . dirname ( to_path ) if ( not os . path . exists ( to_dir ) ) : os . makedirs ( to_dir ) if os . path . isdir ( test_path ) : copy = copytree else : copy = copyfile try : copy ( test_path , to_path ) except OSError : pass
copies a file from mezzanines test data path to media_root .