yohanboniface / pytest-falcon

Pytest helpers for testing Falcon applications
16 stars 6 forks source link

Failures in Python 2 when running tests #9

Closed brianbruggeman closed 7 years ago

brianbruggeman commented 7 years ago

Running just pytest from a newly cloned pytest-falcon repo yields test failures:

==== test session starts ====
platform darwin -- Python 2.7.13, pytest-3.1.3, py-1.4.34, pluggy-0.4.0
rootdir: <redacted>/pytest-falcon, inifile:
plugins: xdist-1.20.0, isort-0.1.0, forked-0.2, flake8-0.8.1, falcon-0.4.2, factoryboy-1.3.1, cov-2.5.1
collected 27 items

tests/test_fixtures.py .F....................
tests/test_multipart.py sssss

==== FAILURES ==== 
____ test_head ____

client = <pytest_falcon.plugin.Client object at 0x1037f3a10>

    def test_head(client):

        class Resource:

            def on_head(self, req, resp, **kwargs):
                resp.set_header("foo", "bar")

        application.add_route('/route', Resource())

>       resp = client.head('/route')
E       AttributeError: 'Client' object has no attribute 'head'

tests/test_fixtures.py:39: AttributeError
=== 1 failed, 21 passed, 5 skipped in 0.14 seconds ====
brianbruggeman commented 7 years ago

This was a venv whoops on my part.