python - find all urls prefixed with something specific flask -


I want to create a test environment for a series of templates in my flask application. The directory structure looks slightly like this:
  run.py app / blueprints / __init__.py bp.py bp2.py bp3.py __init__.py opin.py   init  .pi   , / Url_prefix ('/ Generate' I want to launch a test system which does some such (pseudocode):  
  for each URL that is generated / j: j = json.load (That_url ()) open ('With stability) .json', 'r') as stability: If j == json.load (stability): app.logger.info ('test pass')   

How will this work?

Can not you do this with regular expressions? **

** End of the line assuming the end of the URL is ...

  u = re.c Ompile ('/ generated (...) \ n' ') r = u.findall for l: j = json.load (l) # Add your remaining tasks here ....    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -