def test_0010_configure_the_plugin(self):
     # first, clean the plugin configuration
     print(u"Delete the current plugin configuration")
     self.assertTrue(delete_configuration("plugin", self.name, get_sanitized_hostname()))
     for key in self.configuration:
         print(u"Set up configuration : {0} = {1}".format(key, self.configuration[key]))
         self.assertTrue(configure("plugin", self.name, get_sanitized_hostname(), key, self.configuration[key]))
     for key in self.configuration:
         print(u"Validate the configuration : {0} = {1}".format(key, self.configuration[key]))
         self.assertTrue(check_config("plugin", self.name, get_sanitized_hostname(), key, self.configuration[key]))
Exemple #2
0
 def test_0010_configure_the_plugin(self):
     # first, clean the plugin configuration
     print(u"Delete the current plugin configuration")
     self.assertTrue(
         delete_configuration("plugin", self.name,
                              get_sanitized_hostname()))
     for key in self.configuration:
         print(u"Set up configuration : {0} = {1}".format(
             key, self.configuration[key]))
         self.assertTrue(
             configure("plugin", self.name, get_sanitized_hostname(), key,
                       self.configuration[key]))
     for key in self.configuration:
         print(u"Validate the configuration : {0} = {1}".format(
             key, self.configuration[key]))
         self.assertTrue(
             check_config("plugin", self.name, get_sanitized_hostname(),
                          key, self.configuration[key]))
#!/usr/bin/python
#-*- coding: utf-8 -*-

from domogik.tests.common.helpers import configure, delete_configuration
from domogik.common.utils import get_sanitized_hostname

plugin = "notify"

host_id = get_sanitized_hostname()
delete_configuration("plugin", plugin, host_id)

configure("plugin", plugin, host_id, "msg_header", "Domogik notification")
configure("plugin", plugin, host_id, "send_at_start", True)
configure("plugin", plugin, host_id, "configured", True)
#!/usr/bin/python
#-*- coding: utf-8 -*-

from domogik.tests.common.helpers import configure, delete_configuration
from domogik.common.utils import get_sanitized_hostname

plugin =  "notify"

host_id = get_sanitized_hostname()
delete_configuration("plugin", plugin, host_id)

configure("plugin", plugin, host_id, "msg_header", "Domogik notification")
configure("plugin", plugin, host_id, "send_at_start", True)
configure("plugin", plugin, host_id, "configured", True)
#!/usr/bin/python

from domogik.tests.common.helpers import configure, delete_configuration, check_config
from domogik.common.utils import get_sanitized_hostname

print "==> Set the config"
delete_configuration("plugin", "test", get_sanitized_hostname())
configure("plugin", "test", get_sanitized_hostname(), "dummy", "dummyConfigParam")

print "==> Check the config"
check_config("plugin", "test", get_sanitized_hostname(), "configured", True)
check_config("plugin", "test", get_sanitized_hostname(), "dummy", "dummyConfigParam")
Exemple #6
0
#!/usr/bin/python

from domogik.tests.common.helpers import configure, delete_configuration
from domogik.common.utils import get_sanitized_hostname

delete_configuration("plugin", "rfxcom", get_sanitized_hostname())
configure("plugin", "rfxcom", get_sanitized_hostname(), "configured", True)
configure("plugin", "rfxcom", get_sanitized_hostname(), "rfxcom_device",
          "/dev/rfxcom")
#!/usr/bin/python

from domogik.tests.common.helpers import configure, delete_configuration
from domogik.common.utils import get_sanitized_hostname


delete_configuration("plugin", "diskfree", get_sanitized_hostname())
configure("plugin", "diskfree", get_sanitized_hostname(), "configured", True)

#!/usr/bin/python

from domogik.tests.common.helpers import configure, delete_configuration
from domogik.common.utils import get_sanitized_hostname

name = "rfplayer"

print(delete_configuration("plugin", name, get_sanitized_hostname()))
print(u"Plugin {0} configuration deleted".format(name))
print(configure("plugin", name, get_sanitized_hostname(), "configured", True))
print(u"Plugin {0} configured".format(name))