mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-05-02 00:11:06 -05:00
test.py: Show a *specific* error if the apiKey is not set, instead of causing a TypeError [ci skip]
This commit is contained in:
parent
85f982b7de
commit
f9fc58c95f
5
test.py
5
test.py
@ -14,6 +14,11 @@ class WeatherTestCase(PluginTestCase):
|
||||
def setUp(self):
|
||||
PluginTestCase.setUp(self)
|
||||
apiKey = os.environ.get('apiKey')
|
||||
if not apiKey:
|
||||
e = """The Wunderground API key has not been set.
|
||||
please set this value correctly and try again:
|
||||
'export apiKey=<key>' for bash users"""
|
||||
raise Exception(e)
|
||||
conf.supybot.plugins.Weather.apiKey.setValue(apiKey)
|
||||
|
||||
def testWeather(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user