Metadata-Version: 2.0
Name: ejpiaj
Version: 0.3.2
Summary: ejpiaj
Home-page: https://github.com/onjin/ejpiaj
Author: Marek Wywiał
Author-email: onjinx@gmail.com
License: BSD
Keywords: ejpiaj
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Requires-Dist: requests
Requires-Dist: simplejson
Requires-Dist: clint
Requires-Dist: baker
Requires-Dist: pyyaml

===============================
ejpiaj
===============================

.. image:: https://badge.fury.io/py/ejpiaj.png
    :target: http://badge.fury.io/py/ejpiaj

.. image:: https://travis-ci.org/onjin/ejpiaj.png?branch=master
        :target: https://travis-ci.org/onjin/ejpiaj

.. image:: https://pypip.in/d/ejpiaj/badge.png
        :target: https://pypi.python.org/pypi/ejpiaj


License
-------

* Free software: BSD license

Features
--------

 * describe your API requests in single file (YAML at this moment)
 * extract variables from responses and store them to use in next requests (f.i. to get and use authorization token)
 * write assertions agains responses
 * register your own variables extractors and assertions
 * run suite using ``ejpiaj-cli test -m my_addons -s tests.yml`` command

Sample yml file::

    requests:
      001_search_repos_with_django_in_name:
        method: get
        url: https://api.github.com/search/repositories
        url_params:
          q: django
          sort: stars
          order: desc
        variables:
          json:
            total_count: count
            items.[0].full_name: repo_name
        assertions:
          response:
            - 'status_code equals 200'
          json:
            - 'items.[0].full_name contains ango'

      002_get_commits_from_first_repo:
        method: get
        url: https://api.github.com/repos/{{repo_name}}/commits
        assertions:
          response:
            - 'status_code equals 200'

Run it::

    $ ejpiaj-cli test sample.yml -s

    --------------------------------------------------------------------------------
    P - passed assertions, F - failed assertions, V - extracted variables
    --------------------------------------------------------------------------------
    ✓ 001_search_repos_with_django_in_name [P2,F0,V2] {'count': 29754, 'repo_name': u'django/django'}
    ✓ 002_get_commits_from_first_repo [P1,F0,V0] {}
    --------------------------------------------------------------------------------



Documentation
-------------
* http://ejpiaj.readthedocs.org/en/latest/




History
-------

0.3.2 (2014-02-17)
++++++++++++++++++
* Added -s option to ``ejpiaj-cli`` to display extracted variables

0.3.1 (2014-02-17)
++++++++++++++++++
* Fixed loading custom module from current directory

0.3.0 (2014-02-16)
++++++++++++++++++
* Added support to load own module with custom assertions and variable extractors
  using ``ejpiaj-cli`` tool

0.2.3 (2014-02-10)
++++++++++++++++++
* Fixed tests order (alphabetical)

0.2.2 (2014-02-10)
++++++++++++++++++
* Fixed variable substiution for multi varaibles
* Added variable substitution in 'url'

0.2.1 (2014-02-07)
++++++++++++++++++

* Fixed variables substitution if variable is None

0.2.0 (2014-02-07)
++++++++++++++++++

* Added support for form_params and headers

0.1.0 (2014-02-01)
++++++++++++++++++

* First release on PyPI.


