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
Post a Comment