2014-02-05 17:09:05 +01:00
|
|
|
Testing
|
|
|
|
=======
|
|
|
|
|
|
|
|
Dependencies
|
|
|
|
------------
|
|
|
|
|
2014-02-06 11:14:08 +01:00
|
|
|
Test suite is using +nose+, +httpretty+ and +mock+ for testing. You need these
|
|
|
|
three python modules installed to run tests. In openSUSE, you can do it using
|
|
|
|
the following command as a root:
|
2014-02-05 17:09:05 +01:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
2014-02-06 11:14:08 +01:00
|
|
|
zypper in python-nose python-httpretty python-mock
|
2014-02-05 17:09:05 +01:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Running tests
|
|
|
|
-------------
|
|
|
|
|
|
|
|
To run the tests, you need to be in the topmost directory of your checkout and
|
|
|
|
run the following command there:
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
nosetests
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2014-02-06 11:14:08 +01:00
|
|
|
Structure of the suite
|
|
|
|
----------------------
|
2014-02-05 17:09:05 +01:00
|
|
|
|
|
|
|
Each object is containing functions for the individual tests so split them per
|
|
|
|
area of interest.
|
|
|
|
|
|
|
|
In directory fixtures there are resulting xml files obtained from the OBS with
|
|
|
|
osc api calls.
|
|
|
|
|
|
|
|
Each xml then needs to be overridden in the test so we mock the right file with
|
|
|
|
the proper url.
|