librelist archives

« back to archive

Unit Testing in Flask app

Unit Testing in Flask app

From:
kracekumar ramaraju
Date:
2011-10-30 @ 17:16
Hello
 I am having issues with Flask Unit testing.

My App Structure:

App/
       App/
               __init__.py
               views.py
               database.py

      runserver.py

Now where should I place my tests.

I have seen few application having test.py as same level as runserver.py
and some application have tests folder insider app folder .

Note: I don't have app factory method in my __init__.py
In my __init__.py => I create my app object and secret key.

I had gone through flask-testing extension, It had basics of testing and
under snippets there was no section for testing. In case any one has
example app for testing, please point to the source.

-- 
*
"Talk is cheap, show me the code" - Linus Torvalds
Winning Regards
KraceKumar.R
http://kracekumar.wordpress.com
+91-97906-58304
*
*+91-85530-29521*
*
*