Add check that method exists in Capability.__getattr__.

This makes it play nice with hasattr
This commit is contained in:
Jason Paryani
2014-04-17 20:53:52 -07:00
parent 16678dc26b
commit 56d68325ff
4 changed files with 28 additions and 14 deletions

View File

@@ -49,7 +49,7 @@ def test_client(capability):
assert response.x == '26'
with pytest.raises(ValueError):
with pytest.raises(AttributeError):
client.foo2_request()
req = client.foo_request()
@@ -110,7 +110,7 @@ def test_simple_client(capability):
with pytest.raises(ValueError):
remote = client.foo(i='foo')
with pytest.raises(ValueError):
with pytest.raises(AttributeError):
remote = client.foo2(i=5)
with pytest.raises(AttributeError):