librelist archives

« back to archive

Question about flaskext.testing

Question about flaskext.testing

From:
Italo Maia
Date:
2011-09-28 @ 08:09
The extension flask-testing requires one to provide an app creation method
for it, but, this method, it is invoked for each testcase or for each method
of each testcase? Why? What could be stored in app that requires this
renewing?

-- 
"A arrogância é a arma dos fracos."

===========================
Italo Moreira Campelo Maia
Bacharel em Ciência da Computação - UECE
Desenvolvedor WEB e Desktop (Java, Python, Lua)
Coordenador do Pug-CE
-----------------------------------------------------
http://www.italomaia.com/
http://twitter.com/italomaia/
http://eusouolobomau.blogspot.com/
-----------------------------------------------------
Turtle Linux  9.10 - http://tiny.cc/blogturtle910
Turtle Linux 10.10 - http://bit.ly/cEw4ET
===========================

Re: [flask] Question about flaskext.testing

From:
Gregg Lind
Date:
2011-09-28 @ 15:21
Database connections, clearing sessions, and in general starting with
a 'known, clean slate'.   Ideally, tests should verify all of this as
part of the test setup process, but why risk making a mistake?

(I actually don't know at what level the app construction happens,
just stating why it would make sense to do it *a lot*)

GL

On Wed, Sep 28, 2011 at 1:09 AM, Italo Maia <italo.maia@gmail.com> wrote:
> The extension flask-testing requires one to provide an app creation method
> for it, but, this method, it is invoked for each testcase or for each method
> of each testcase? Why? What could be stored in app that requires this
> renewing?
>
> --
> "A arrogância é a arma dos fracos."
>
> ===========================
> Italo Moreira Campelo Maia
> Bacharel em Ciência da Computação - UECE
> Desenvolvedor WEB e Desktop (Java, Python, Lua)
> Coordenador do Pug-CE
> -----------------------------------------------------
> http://www.italomaia.com/
> http://twitter.com/italomaia/
> http://eusouolobomau.blogspot.com/
> -----------------------------------------------------
> Turtle Linux  9.10 - http://tiny.cc/blogturtle910
> Turtle Linux 10.10 - http://bit.ly/cEw4ET
> ===========================
>

Re: [flask] Question about flaskext.testing

From:
Italo Maia
Date:
2011-09-28 @ 16:35
I asked that because I'm making a example code with flask-lettuce and would
like to know if the factory should be invoked in each feature or each
scenario (more likely).

2011/9/28 Gregg Lind <gregg.lind@gmail.com>

> Database connections, clearing sessions, and in general starting with
> a 'known, clean slate'.   Ideally, tests should verify all of this as
> part of the test setup process, but why risk making a mistake?
>
> (I actually don't know at what level the app construction happens,
> just stating why it would make sense to do it *a lot*)
>
> GL
>
> On Wed, Sep 28, 2011 at 1:09 AM, Italo Maia <italo.maia@gmail.com> wrote:
> > The extension flask-testing requires one to provide an app creation
> method
> > for it, but, this method, it is invoked for each testcase or for each
> method
> > of each testcase? Why? What could be stored in app that requires this
> > renewing?
> >
> > --
> > "A arrogância é a arma dos fracos."
> >
> > ===========================
> > Italo Moreira Campelo Maia
> > Bacharel em Ciência da Computação - UECE
> > Desenvolvedor WEB e Desktop (Java, Python, Lua)
> > Coordenador do Pug-CE
> > -----------------------------------------------------
> > http://www.italomaia.com/
> > http://twitter.com/italomaia/
> > http://eusouolobomau.blogspot.com/
> > -----------------------------------------------------
> > Turtle Linux  9.10 - http://tiny.cc/blogturtle910
> > Turtle Linux 10.10 - http://bit.ly/cEw4ET
> > ===========================
> >
>



-- 
"A arrogância é a arma dos fracos."

===========================
Italo Moreira Campelo Maia
Bacharel em Ciência da Computação - UECE
Desenvolvedor WEB e Desktop (Java, Python, Lua)
Coordenador do Pug-CE
-----------------------------------------------------
http://www.italomaia.com/
http://twitter.com/italomaia/
http://eusouolobomau.blogspot.com/
-----------------------------------------------------
Turtle Linux  9.10 - http://tiny.cc/blogturtle910
Turtle Linux 10.10 - http://bit.ly/cEw4ET
===========================