Skip to content

Commit

Permalink
updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
shyal committed Dec 6, 2016
1 parent bdeed87 commit f398c1b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
36 changes: 21 additions & 15 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ Cloning

We're currently in development mode, so you're better off cloning the repository. Make sure to pull often!

.. code:: bash
$ git clone https://github.com/SpectoLabs/hoverpy.git
$ cd hoverpy
Or using virtualenv
-------------------

If you prefer using virtualenv to keep your environment clean:

.. code:: bash
$ virtualenv hoverpyenv
Expand All @@ -30,12 +20,24 @@ If you prefer using virtualenv to keep your environment clean:
Testing
-------

Make sure everything is working:
Please make sure everything is working before proceeding to the next steps.

.. code:: bash
$ python setup.py test
You should get a series of ``OKs``.

`Output:`

.. code:: bash
...
testModify (hoverpy.tests.modify.testModify.TestModify) ... ok
testTemplate (hoverpy.tests.templates.testTemplates.TestTemplates) ... ok
testCapture (hoverpy.tests.testVirtualisation.TestVirt) ... ok
testPlayback (hoverpy.tests.testVirtualisation.TestVirt) ... ok
Running the examples
--------------------

Expand All @@ -45,9 +47,13 @@ Running the examples
$ basic delays modify readthedocs tornado unittesting urllib2eg urllib3eg
$ python examples/basic/basic.py
Please note we'll cover the examples in `usage`_ page.
Please note we'll cover the examples in the `usage`_ page. But for the truly impatient, you can try running the most basic example, just to make sure everything's working at this point.

.. _usage: usage.html

.. code:: bash
.. _usage: usage.html
$ env PYTHONPATH=.:${PYTHONPATH} python examples/basic/basic.py
Installing from repo
--------------------
Expand All @@ -56,7 +62,7 @@ Please note there isn't yet much point installing HoverPy since we're currently

.. code:: bash
sudo python setup.py install
$ sudo python setup.py install
Installing from PIP
-------------------
Expand All @@ -65,4 +71,4 @@ You can also install HoverPy from PIP, however once again you're better off play

.. code:: bash
pip install --user -i https://testpypi.python.org/pypi hoverpy
$ pip install --user -i https://testpypi.python.org/pypi hoverpy
Empty file added examples/__init__.py
Empty file.
Empty file added examples/basic/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

class TestVirt(basetestcase.BaseTestCase):

def test_capture(self):
def testCapture(self):
logging.debug("test_capture")
with HoverPy(capture=True):
r = requests.get("http://localhost:8888/api/v2/hoverfly")
self.assertIn('destination', r.json())

def test_playback(self):
def testPlayback(self):
logging.debug("test_playback")
with HoverPy(capture=True) as hoverpy:
r = requests.get("http://localhost:8888/api/v2/hoverfly")
Expand Down

0 comments on commit f398c1b

Please sign in to comment.