Exemplo n.º 1
0
    def __init__(self):
        '''
        Instantuate the Average class and read the configuration File.

        '''
        super(Average, self).__init__()
        self.config = FormatConfiguration().configure('avg.xml')
Exemplo n.º 2
0
 def __init__(self):
     '''
     Construct FormatValue object and read the configuration file formatvalue.xml
     '''
     super(FormatValue, self).__init__()
     format = FormatConfiguration()
     self.config = format.configure('formatvalue.xml')
Exemplo n.º 3
0
 def __init__( self ):
     '''
     Construct the object OneInN and read the configuration file.
     '''
     super( OneInN, self ).__init__()
     self.config = FormatConfiguration().configure( 'oneInN.xml' )
     self.count = {}
 def test_process_configuration(self, configure):
     exformat = {
         '0x13a200408cccc3': {
             'adc-0': '{:3.1f}',
             'adc-1': '{:3.1f}'
         },
         '0x13a200409029bf': {
             'adc-1': '{:3.1f}'
         }
     }
     fc = FormatConfiguration()
     et = fromstring(xml)
     config = fc.process_configuration(et)
     self.assertDictEqual(config, exformat)
 def test_logger_name(self, configure):
     x = FormatConfiguration()
     self.assertEqual(x.logger_name, Constants.LogKeys.configuration)
 def test_configuration_topic_name(self, configure):
     x = FormatConfiguration()
     self.assertEqual(x.configuration_file_name,
                      "housemonitor.configuration.formatconfiguration")