def testParseSimple(self):
     f = self._buildPlanet('')
     config = PlanetConfigParser(f)
     config.parse()
     self.failIf(config.flows)
     self.failIf(config.path)
     self.failIf(config.atmosphere.components)
Пример #2
0
 def testParseSimple(self):
     f = self._buildPlanet('')
     config = PlanetConfigParser(f)
     config.parse()
     self.failIf(config.flows)
     self.failIf(config.path)
     self.failIf(config.atmosphere.components)
 def testParseAtmosphereWithComponent(self):
     f = self._buildAtmosphere(
         '<component name="cname" type="http-server" worker="worker"/>')
     config = PlanetConfigParser(f)
     config.parse()
     components = config.atmosphere.components
     self.failUnless(components)
     self.failUnless('cname' in components)
     component = components.pop('cname')
     self.failUnless(component)
     self.failUnless(isinstance(component, ConfigEntryComponent))
     self.assertEquals(component.worker, 'worker')
     self.assertEquals(component.type, 'http-server')
     self.assertEquals(component.config['avatarId'], '/atmosphere/cname')
     self.failIf(flatten(component.config['plugs'].values()))
Пример #4
0
 def testParseAtmosphereWithComponent(self):
     f = self._buildAtmosphere(
         '<component name="cname" type="http-server" worker="worker"/>')
     config = PlanetConfigParser(f)
     config.parse()
     components = config.atmosphere.components
     self.failUnless(components)
     self.failUnless('cname' in components)
     component = components.pop('cname')
     self.failUnless(component)
     self.failUnless(isinstance(component, ConfigEntryComponent))
     self.assertEquals(component.worker, 'worker')
     self.assertEquals(component.type, 'http-server')
     self.assertEquals(component.config['avatarId'], '/atmosphere/cname')
     self.failIf(flatten(component.config['plugs'].values()))
 def testParseFlow(self):
     f = self._buildFlow(
         '<component name="audio" type="audiotest-producer" '
         'worker="worker">'
         '  <clock-master>true</clock-master>'
         '</component>'
         '<component name="video" type="videotest-producer" '
         'worker="worker">'
         '</component>')
     config = PlanetConfigParser(f)
     config.parse()
     self.failUnless(config.flows)
     self.assertEquals(len(config.flows), 1)
     components = config.flows[0].components
     self.failUnless(components)
     self.failUnless('video' in components)
     component = components.pop('audio')
     self.assertEquals(component.type, 'audiotest-producer')
     self.assertEquals(component.config['clock-master'], '/flow/audio')
     component = components.pop('video')
     self.assertEquals(component.type, 'videotest-producer')
     self.assertEquals(component.config['clock-master'], '/flow/audio')
     self.failIf(components)
Пример #6
0
 def testParseFlow(self):
     f = self._buildFlow(
         '<component name="audio" type="audiotest-producer" '
         'worker="worker">'
         '  <clock-master>true</clock-master>'
         '</component>'
         '<component name="video" type="videotest-producer" '
         'worker="worker">'
         '</component>')
     config = PlanetConfigParser(f)
     config.parse()
     self.failUnless(config.flows)
     self.assertEquals(len(config.flows), 1)
     components = config.flows[0].components
     self.failUnless(components)
     self.failUnless('video' in components)
     component = components.pop('audio')
     self.assertEquals(component.type, 'audiotest-producer')
     self.assertEquals(component.config['clock-master'], '/flow/audio')
     component = components.pop('video')
     self.assertEquals(component.type, 'videotest-producer')
     self.assertEquals(component.config['clock-master'], '/flow/audio')
     self.failIf(components)
 def testParseAtmosphereEmpty(self):
     f = self._buildAtmosphere('')
     config = PlanetConfigParser(f)
     config.parse()
     self.failIf(config.atmosphere.components)
Пример #8
0
 def testParseAtmosphereEmpty(self):
     f = self._buildAtmosphere('')
     config = PlanetConfigParser(f)
     config.parse()
     self.failIf(config.atmosphere.components)