Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install flea

How to install flea

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install flea
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
7.3.2
7.4.1Never BuiltWhy not?
7.3.2 Available View build log
7.3.1 Available View build log
7.3.0 Available View build log
7.2.0 Available View build log
7.1.1 Available View build log
7.1.0 Available View build log
7 Available View build log
Windows (64-bit)
7.3.2
7.4.1Never BuiltWhy not?
7.3.2 Available View build log
7.3.1 Available View build log
7.3.0 Available View build log
7.2.0 Available View build log
7.1.1 Available View build log
7.1.0 Available View build log
7 Available View build log
Mac OS X (10.5+)
7.3.2
7.4.1Never BuiltWhy not?
7.3.2 Available View build log
7.3.1 Available View build log
7.3.0 Available View build log
7.2.0 Available View build log
7.1.1 Available View build log
7.1.0 Available View build log
7 Available View build log
7.4.0
7.4.1Never BuiltWhy not?
7.4.0 Available View build log
Linux (32-bit)
7.4.0
7.4.1Never BuiltWhy not?
7.4.0 Available View build log
7.3.4 Available View build log
7.3.3 Available View build log
7.3.2 Available View build log
7.3.1 Available View build log
7.3.0 Available View build log
7.2.0 Available View build log
7.1.1 Available View build log
7.1.0 Available View build log
7 Available View build log
7.4.0
7.4.1Never BuiltWhy not?
7.4.0 Available View build log
Linux (64-bit)
7.4.1 Available View build log
7.4.0 Available View build log
7.3.4 Available View build log
7.3.3 Available View build log
7.3.2 Available View build log
7.3.1 Available View build log
7.3.0 Available View build log
7.2.0 Available View build log
7.1.1 Available View build log
7.1.0 Available View build log
7 Available View build log
7.4.0
7.4.1Never BuiltWhy not?
7.4.0 Available View build log
 
Author
License
BSD
Imports
Lastest release
version 7.4.1 on Sep 20th, 2013

Flea is a library that helps you write functional tests for WSGI applications.

Flea uses CSS selectors and XPath to give you a simple but powerful tool to navigate and test the HTML responses generated by your WSGI web applications. Here's an example of how easy it is to test a WSGI application:

>>> r = TestAgent(my_wsgi_app).get('/')
>>> print r.body
<html>
        <body>
                <a href="/sign-in">sign in</a>
        </body>
</html>
>>> r = r.click('sign in')
>>> r = r("form#login-form").fill(
...     username = 'root',
...     password = 'secret',
... ).submit()
>>> assert 'login successful' in r.body

Changes

Version 7.4.1

  • Bugfix: Fixed error in TestAgent.serve()
  • Improved unicode handling for WSGI environ values

Version 7.4.0

  • Switch to fresco from pesto
  • Experimental Python 3 support
  • Bugfix: ensure WSGI response iterator's close method is always called

Version 7.3.4

  • Updated setup.py to require cssselect

Version 7.3.3

  • Included logging facility to allow easy tracing of calls to the application under test
  • Added a flea.testing WSGI environ key so that the AUT can tell when it is running in a test environment
  • Fixed a bug in post_multipart that caused an error when passing a data dict

Version 7.3.2

  • Fixed bug in fill method, which was not clearing checkbox elements

Version 7.3.1

  • Fixed bug in TestAgent.follow

Version 7.3.0

  • New API for form filling, with each control type having a fill method. The value attribute is no longer overloaded.
  • You can now traverse the DOM by calling the TestAgent object directly with either a CSS selector or XPath expression.
  • TestAgent.click() now takes an argument that selects links by their textual content, eg agent.click('view results'). If you want the old behaviour, you need to pass a second argument, eg agent.click('//a[.="view results"]', 'xpath').

Version 7.2.1

  • The value property now does the right thing with respect to checkbox and

    radio groups. For checkbox groups, .value will get/set a list of values corresponding to the selected checkboxes. For radio buttons, .value will get/set the selected radio button.

  • Fixed error following links containing a fragment identifier

Version 7.2.0

  • Added .reload and .new_session methods to TestAgent

Version 7.1.1

  • Fixed check_status argument not being accepted in get, post, click, submit etc methods

Version 7.1.0

  • Added .fill - fill multiple form fields in a single call.

  • Added .show - show the current response in a web browser

  • Added .serve - start an HTTP server for the the application under test and

    open a browser at the current page

  • Added check for HTTP status success or redirect codes (2xx or 3xx),

    anything else raises an AssertionError by default

  • Changed default behaviour to follow HTTP redirects

  • Changed version numbering scheme to <major>.<minor>

Version 7

  • Fixed error when accessing the 'checked' property of an input box

  • Prevented raising of ValueError on non-matching xpaths when accessed by

    .find() (__getitem__ will however still raise an error).

Version 6

  • Requires pesto 16 or higher

Version 5

  • Updated setup.py for compatibility with pesto==15

Version 4

  • Added support for file upload fields
  • Allow TestAgent.get/post etc to take a relative URI as an argument

Version 3

  • Updated setup.py for compatibility with pesto==14

Version 2

  • EXSLT regular expression namespace is bound to re prefix by default,

    allowing regexps in xpath expressions.

  • Bug fixes for form element handling

Version 1

  • Initial release

Subscribe to package updates

Last updated Sep 20th, 2013

Download Stats

Last month:14

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.