Added test
This commit is contained in:
parent
c1d9023bd3
commit
772ce9b34d
|
@ -23,5 +23,6 @@ class Client(object):
|
||||||
))
|
))
|
||||||
url = 'http://api.wolframalpha.com/v2/query?' + query
|
url = 'http://api.wolframalpha.com/v2/query?' + query
|
||||||
resp = urllib2.urlopen(url)
|
resp = urllib2.urlopen(url)
|
||||||
assert resp.headers['Content-Type'] == 'application/xml'
|
assert resp.headers.gettype() == 'text/xml'
|
||||||
|
assert resp.headers.getparam('charset') == 'utf-8'
|
||||||
return Result(resp)
|
return Result(resp)
|
||||||
|
|
8
wolframalpha/test_client.py
Normal file
8
wolframalpha/test_client.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import wolframalpha
|
||||||
|
|
||||||
|
app_id = 'Q59EW4-7K8AHE858R'
|
||||||
|
"App ID for testing this project. Please don't use for other apps."
|
||||||
|
|
||||||
|
def test_basic():
|
||||||
|
client = wolframalpha.Client(app_id)
|
||||||
|
client.query('30 deg C in deg F')
|
Loading…
Reference in New Issue
Block a user