Re: [flask] How do you set up fixtures in flask?
- From:
- Nicholas Retallack
- Date:
- 2011-02-16 @ 10:21
It took me a while to figure out how this works. It seems odd that it does
a db.dispose() on the fixtures object in the install function -- this does
not work in my setup, so I moved it to the teardown phase.
Now that I have fixtures working, how do I get the actual database record
associated with one of my fixture DataSets? Like, what if I wanted to know
what id my fixture was created with? Should I specify that myself?
On Sat, Feb 12, 2011 at 9:26 PM, Ron DuPlain <ron.duplain@gmail.com> wrote:
> Hi Nicholas,
>
> On Sat, Feb 12, 2011 at 4:48 PM, Nicholas Retallack
> <nickretallack@gmail.com> wrote:
> > This snippet on testing mentions you could use FIxture to test sqlalchemy
> > models. But the Fixture tutorial seems very specific to Pylons. If
> anyone
> > has this working with Flask, could you share how you did it?
>
> https://gist.github.com/824472
>
> Hope this helps,
>
> Ron
>