From 1d3ba9f629c8d124b96f7c9e42374bcb6d5e7f2c Mon Sep 17 00:00:00 2001 From: kongr45gpen Date: Thu, 17 Mar 2016 20:39:54 +0200 Subject: Allow changing configuration values in tests --- local/testing/ExpectationPluginTestCase.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'local') 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: -- cgit v1.2.3