Extend test to capture exactly one result with exactly one text.
This commit is contained in:
parent
14ba338b1e
commit
946b5d1f4b
|
@ -26,8 +26,10 @@ def test_basic(API_key):
|
||||||
client = wolframalpha.Client(API_key)
|
client = wolframalpha.Client(API_key)
|
||||||
res = client.query('30 deg C in deg F')
|
res = client.query('30 deg C in deg F')
|
||||||
assert len(res.pods) > 0
|
assert len(res.pods) > 0
|
||||||
results = list(res.results)
|
result, = res.results
|
||||||
assert results[0].text == '86 °F (degrees Fahrenheit)'
|
assert result.text == '86 °F (degrees Fahrenheit)'
|
||||||
|
assert result.texts == ['86 °F (degrees Fahrenheit)']
|
||||||
|
|
||||||
|
|
||||||
def test_invalid_app_id():
|
def test_invalid_app_id():
|
||||||
client = wolframalpha.Client('abcdefg')
|
client = wolframalpha.Client('abcdefg')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user