data for unit tests

35 views
Skip to first unread message

rin...@gmail.com

unread,
May 29, 2012, 4:37:50 PM5/29/12
to TurboGears
Hello,

how do you pass test data for unit tests for turbogears applications?
I have testing sqlite database and want to use it for unit testing,
without converting the data into python code and cannot figure it out.
Can fixture lib be used somehow?

Alessandro Molina

unread,
May 30, 2012, 2:45:26 PM5/30/12
to turbo...@googlegroups.com
If you test units do not alter the database you can simply change
test.ini to point to your testing database.

Otherwise sqlite is able to export its content as csv, which you can
easily load from python using the csv module to load your test data.
> --
> You received this message because you are subscribed to the Google Groups "TurboGears" group.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to turbogears+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.
>

NiL

unread,
Jun 7, 2012, 6:04:45 AM6/7/12
to turbo...@googlegroups.com
I've been successfuly using bootalchemy for this purpose

Moritz Schlarb

unread,
Jun 7, 2012, 7:24:59 AM6/7/12
to turbo...@googlegroups.com
Yay, thanks for that tip!

Gonna use bootalchemy for my project! ;)
Reply all
Reply to author
Forward
0 new messages