librelist archives

« back to archive

ANN: flask-unit

ANN: flask-unit

From:
Dan Jacob
Date:
2010-06-23 @ 08:01
I have added a small Flask extension to Bitbucket:

http://bitbucket.org/danjac/flask-unit

Flask-unit is a subclass of unittest.TestCase. It is based on this
snippet: http://flask.pocoo.org/snippets/26/

The TestCase does all the required application and context setup, and
includes some utility functions for checking redirect URLs etc.

You define a create_app() method in your TestCase. For example:

class MyTest(TestCase):

    def create_app(self):
        app = Flask(__name__)
        return app

    def test_something(self):
        assert self.app

A test client is automatically created and stored as self.client. In
addition the test context is automatically created and disposed.

Re: [flask] ANN: flask-unit

From:
Armin Ronacher
Date:
2010-06-23 @ 08:04
Hi,


On 6/23/10 10:01 AM, Dan Jacob wrote:
> I have added a small Flask extension to Bitbucket:
>
> http://bitbucket.org/danjac/flask-unit
What about renaming that to flask-testing and also add support for twill 
in there?


Regards,
Armin

Re: [flask] ANN: flask-unit

From:
Dan Jacob
Date:
2010-06-23 @ 08:08
Sure, I wasn't sure whether to explicitly mention it was using unittest or not.

What ideas do you have for twill support ?

On 23 June 2010 09:04, Armin Ronacher <armin.ronacher@active-4.com> wrote:
> Hi,
>
>
> On 6/23/10 10:01 AM, Dan Jacob wrote:
>> I have added a small Flask extension to Bitbucket:
>>
>> http://bitbucket.org/danjac/flask-unit
> What about renaming that to flask-testing and also add support for twill
> in there?
>
>
> Regards,
> Armin
>

Re: [flask] ANN: flask-unit

From:
Dan Jacob
Date:
2010-06-23 @ 08:12
Name changed to flask-testing.

On 23 June 2010 09:08, Dan Jacob <danjac354@gmail.com> wrote:
> Sure, I wasn't sure whether to explicitly mention it was using unittest or not.
>
> What ideas do you have for twill support ?
>
> On 23 June 2010 09:04, Armin Ronacher <armin.ronacher@active-4.com> wrote:
>> Hi,
>>
>>
>> On 6/23/10 10:01 AM, Dan Jacob wrote:
>>> I have added a small Flask extension to Bitbucket:
>>>
>>> http://bitbucket.org/danjac/flask-unit
>> What about renaming that to flask-testing and also add support for twill
>> in there?
>>
>>
>> Regards,
>> Armin
>>
>