Exemplo n.º 1
0
 def testComponentWithPlug(self):
     c = Component()
     c.name = 'name'
     c.componentType = 'streamer'
     c.worker = 'worker'
     plug = Plug()
     plug.plugType = 'plug-type'
     plug.properties.foo = 'bar'
     c.plugs.append(plug)
     writer = ConfigurationWriter('flow', [c], [])
     testsuite.diffStrings(
         ('<planet>\n'
          '  <flow name="flow">\n'
          '    <component name="name"\n'
          '               type="streamer"\n'
          '               project="flumotion"\n'
          '               worker="worker"\n'
          '               version="%(version)s">\n'
          '      \n'
          '      <plugs>\n'
          '        <plug type="plug-type">\n'
          '          \n'
          '          <property name="foo">bar</property>\n'
          '        </plug>\n'
          '      </plugs>\n'
          '    </component>\n'
          '  </flow>\n'
          '</planet>\n' % dict(version=configure.version)),
         writer.getXML())
Exemplo n.º 2
0
 def testComponentWithPlug(self):
     c = Component()
     c.name = 'name'
     c.componentType = 'streamer'
     c.worker = 'worker'
     plug = Plug()
     plug.plugType = 'plug-type'
     plug.properties.foo = 'bar'
     c.plugs.append(plug)
     writer = ConfigurationWriter('flow', [c], [])
     testsuite.diffStrings(
         XMLWriter.encoding + \
         ('<planet>\n'
          '  <flow name="flow">\n'
          '    <component name="name"\n'
          '               type="streamer"\n'
          '               project="flumotion"\n'
          '               worker="worker"\n'
          '               version="%(version)s">\n'
          '      \n'
          '      <plugs>\n'
          '        <plug type="plug-type">\n'
          '          \n'
          '          <property name="foo">bar</property>\n'
          '        </plug>\n'
          '      </plugs>\n'
          '    </component>\n'
          '  </flow>\n'
          '</planet>\n' % dict(version=configure.version)),
         writer.getXML())
Exemplo n.º 3
0
 def __init__(self, component):
     Plug.__init__(self)
     self.component = component
     self.properties.logfile = '/tmp/access.log'
Exemplo n.º 4
0
 def __init__(self, component):
     Plug.__init__(self)
     self.component = component
     self.properties.argument_name = 'force'
     self.properties.trigger_value = 'true'
Exemplo n.º 5
0
 def __init__(self, component):
     Plug.__init__(self)
     self.component = component
     self.properties.logfile = '/tmp/access.log'
Exemplo n.º 6
0
 def __init__(self, component):
     Plug.__init__(self)
     self.component = component
     self.properties.argument_name = 'force'
     self.properties.trigger_value = 'true'