From 1a265a7c688a98d033cfc7e6c08c56d1b4c183f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Jun 2014 10:48:47 +0100 Subject: [PATCH] Add test capturing need to raise an exception when the app id is invalid. --- wolframalpha/test_client.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wolframalpha/test_client.py b/wolframalpha/test_client.py index 5de8bc2..17b05b7 100644 --- a/wolframalpha/test_client.py +++ b/wolframalpha/test_client.py @@ -2,6 +2,8 @@ from __future__ import unicode_literals +import pytest + import wolframalpha app_id = 'Q59EW4-7K8AHE858R' @@ -13,3 +15,8 @@ def test_basic(): assert len(res.pods) > 0 results = list(res.results) assert results[0].text == '86 °F (degrees Fahrenheit)' + +def test_invalid_app_id(): + client = wolframalpha.Client('abcdefg') + with pytest.raises(Exception): + client.query('30 deg C in deg F')