Basically we have a bit of SQL Object in a function which creates test data for me.
If you need different test data, create a different test function. For some performance tests which required lots and lots of data, we load data from a dump, again using a simple python function. There's no "fixture framework" but it seems to work well enough for us. --Mark On 6/15/07, Andrew <[EMAIL PROTECTED]> wrote: > > By 'load test data' I mean populating a test database with some > example data that I then can test against. > > Thanks for info you given this should get me started. > > - Andrew. > > On Jun 14, 8:37 pm, "Ian Wilson" <[EMAIL PROTECTED]> wrote: > > What do you mean "load test data" ? Make the data using the ORM layer? > > Or like load from a file ? > > > > You can use the data base as if it were real using the DBTest module.. > > which really isn't that fancy it just sets the database url for you > > and drops and recreates all the tables. > > > > Is this not what you want ?:http://paste.turbogears.org/paste/1390 > > > > You need to use nose with that example though, here is a good > > link:http://ivory.idyll.org/articles/nose-intro.html#test-fixtures > > > > On 6/14/07, Andrew <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi, > > > > > I've already looked through the online docs and through the Rapid Web > > > App book but there's no mention of loading in test data prior to > > > running a test. I did find a library called Fixture which solves the > > > problem of creating and loading test data with either SQLAlchemy or > > > SQLObject. Has anyone used this with TG? > > > > > Andrew > > > > > On Jun 13, 7:47 pm, "Ian Wilson" <[EMAIL PROTECTED]> wrote: > > > > If you are using sqlobject and nose try > > > > this:http://docs.turbogears.org/1.0/Testing > > > > See: Testing Your Model > > > > > > -Ian > > > > > > On 6/13/07, Andrew <[EMAIL PROTECTED]> wrote: > > > > > > > Hello, > > > > > > > Does anyone have any suggestions or examples of using fixtures with > > > > > model testing. I want to test several interrelated models and it would > > > > > be far easier if I could load a few fixtures that we available to each > > > > > test. > > > > > > > Any help would be greatly appreciated. > > > > > -- Mark Ramm-Christensen email: mark at compoundthinking dot com blog: www.compoundthinking.com/blog --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

