Skip to content

Commit

Permalink
fix(tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
h2non committed Dec 8, 2016
1 parent cc23c23 commit 9715f9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions examples/pytest_example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

import pook
import pytest
import requests


Expand Down Expand Up @@ -29,3 +30,9 @@ def test_context_manager():
pook.get('server.com/baz', reply=204)
res = requests.get('http://server.com/baz')
assert res.status_code == 204


def test_no_match_exception():
pook.get('server.com/bar', reply=204)
with pytest.raises(Exception):
requests.get('http://server.com/baz')
2 changes: 1 addition & 1 deletion tests/integration/engines/pytest_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ def test_context_manager():

def test_no_match_exception():
pook.get('server.com/bar', reply=204)
with pytest.raises(RuntimeError):
with pytest.raises(Exception):
requests.get('http://server.com/baz')

0 comments on commit 9715f9e

Please sign in to comment.