mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-05-02 16:31:11 -05:00
Merge pull request #6 from GLolol/tests-warnIfNoApiKey
test.py: Show a specific error if the apiKey is not set
This commit is contained in:
commit
b1f06c79f8
5
test.py
5
test.py
@ -15,6 +15,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