aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2016-03-17 20:39:54 +0200
committerkongr45gpen <electrovesta@gmail.com>2016-03-17 20:39:54 +0200
commit1d3ba9f629c8d124b96f7c9e42374bcb6d5e7f2c (patch)
treed00ff5487bb4c928ce263e5b9201fe9fce955be8
parent88b69cf358d979642d2aca53c77042bd51749456 (diff)
downloadsupybot_github-1d3ba9f629c8d124b96f7c9e42374bcb6d5e7f2c.tar.gz
supybot_github-1d3ba9f629c8d124b96f7c9e42374bcb6d5e7f2c.tar.bz2
supybot_github-1d3ba9f629c8d124b96f7c9e42374bcb6d5e7f2c.zip
Allow changing configuration values in tests
-rw-r--r--local/testing/ExpectationPluginTestCase.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/local/testing/ExpectationPluginTestCase.py b/local/testing/ExpectationPluginTestCase.py
index 27194c2..507fd87 100644
--- a/local/testing/ExpectationPluginTestCase.py
+++ b/local/testing/ExpectationPluginTestCase.py
@@ -52,7 +52,11 @@ class ExpectationPluginTestCase(PluginTestCase):
with open('samples/' + file + '.json', 'r') as content_file:
content = content_file.read()
self.files[file] = content
- res = urllib.urlopen('http://localhost:' + str(self.port), 'payload=' + content)
+ urllib.urlopen('http://localhost:' + str(self.port), 'payload=' + content)
+
+ def conf(self, name, value):
+ """Sets one of the plugin's configuration values"""
+ conf.supybot.plugins.get("Github").get(name).setValue(value)
def testDocumentation(self):
if self.__class__ == ExpectationPluginTestCase:

© 2014-2024 Faster IT GmbH | imprint | privacy policy