Exemple #1
0
 def testEmptyAdminName(self):
     strId = ('' + '(' + 'cells/wdrCell/nodes/wdrNode/servers/wdrServer' +
              '|' + 'resources.xml' + '#' + 'DataSource_1234567890123' +
              ')')
     self.assert_(_isConfigId(strId))
     cfgId = _parseConfigId(strId)
     self.assertEquals(cfgId.name, '')
     self.assertEquals(cfgId.xmlPath,
                       'cells/wdrCell/nodes/wdrNode/servers/wdrServer')
     self.assertEquals(cfgId.xmlDoc, 'resources.xml')
     self.assertEquals(cfgId.xmlId, 'DataSource_1234567890123')
Exemple #2
0
 def testQuotedParenthesisInAdminName(self):
     strId = ('' + '"' + 'Derby JDBC Provider (XA)' + '(' +
              'cells/wdrCell/nodes/wdrNode/servers/wdrServer' + '|' +
              'resources.xml' + '#' + 'builtin_jdbcprovider' + ')' + '"')
     self.assert_(_isConfigId(strId))
     cfgId = _parseConfigId(strId)
     self.assertEquals(cfgId.name, 'Derby JDBC Provider (XA)')
     self.assertEquals(cfgId.xmlPath,
                       'cells/wdrCell/nodes/wdrNode/servers/wdrServer')
     self.assertEquals(cfgId.xmlDoc, 'resources.xml')
     self.assertEquals(cfgId.xmlId, 'builtin_jdbcprovider')
Exemple #3
0
 def testQuotedWithTrailingSpace(self):
     strId = ('' + '"' + 'Default Datasource ' + '(' +
              'cells/wdrCell/nodes/wdrNode/servers/wdrServer' + '|' +
              'resources.xml' + '#' + 'DataSource_1234567890123' + ')' +
              '"')
     self.assert_(_isConfigId(strId))
     cfgId = _parseConfigId(strId)
     self.assertEquals(cfgId.name, 'Default Datasource ')
     self.assertEquals(cfgId.xmlPath,
                       'cells/wdrCell/nodes/wdrNode/servers/wdrServer')
     self.assertEquals(cfgId.xmlDoc, 'resources.xml')
     self.assertEquals(cfgId.xmlId, 'DataSource_1234567890123')
Exemple #4
0
 def testEmptyAdminName(self):
     strId = (
         ''
         + '('
         + 'cells/wdrCell/nodes/wdrNode/servers/wdrServer'
         + '|'
         + 'resources.xml'
         + '#'
         + 'DataSource_1234567890123'
         + ')'
     )
     self.assert_(_isConfigId(strId))
     cfgId = _parseConfigId(strId)
     self.assertEquals(cfgId.name, '')
     self.assertEquals(
         cfgId.xmlPath, 'cells/wdrCell/nodes/wdrNode/servers/wdrServer'
     )
     self.assertEquals(cfgId.xmlDoc, 'resources.xml')
     self.assertEquals(cfgId.xmlId, 'DataSource_1234567890123')
Exemple #5
0
 def testQuotedWithLeadingSpace(self):
     strId = (
         ''
         + '"'
         + ' Default Datasource'
         + '('
         + 'cells/wdrCell/nodes/wdrNode/servers/wdrServer'
         + '|'
         + 'resources.xml'
         + '#'
         + 'DataSource_1234567890123'
         + ')'
         + '"'
     )
     self.assert_(_isConfigId(strId))
     cfgId = _parseConfigId(strId)
     self.assertEquals(cfgId.name, ' Default Datasource')
     self.assertEquals(
         cfgId.xmlPath, 'cells/wdrCell/nodes/wdrNode/servers/wdrServer'
     )
     self.assertEquals(cfgId.xmlDoc, 'resources.xml')
     self.assertEquals(cfgId.xmlId, 'DataSource_1234567890123')
Exemple #6
0
 def testQuotedParenthesisInAdminName(self):
     strId = (
         ''
         + '"'
         + 'Derby JDBC Provider (XA)'
         + '('
         + 'cells/wdrCell/nodes/wdrNode/servers/wdrServer'
         + '|'
         + 'resources.xml'
         + '#'
         + 'builtin_jdbcprovider'
         + ')'
         + '"'
     )
     self.assert_(_isConfigId(strId))
     cfgId = _parseConfigId(strId)
     self.assertEquals(cfgId.name, 'Derby JDBC Provider (XA)')
     self.assertEquals(
         cfgId.xmlPath, 'cells/wdrCell/nodes/wdrNode/servers/wdrServer'
     )
     self.assertEquals(cfgId.xmlDoc, 'resources.xml')
     self.assertEquals(cfgId.xmlId, 'builtin_jdbcprovider')