<div dir="ltr">Hi everyone,<div><div style="font-size:12.8px">I wrote a congress datasource driver and its unit test for designate, but i got the following errors in the method test_update_from_datasource. It's something wrong in the translation.<br></div><span style="font-size:12.8px">Here is the traceback:</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px"> File "congress/tests/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">test_designate_driver.py", line 34, in setUp</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self.driver = designate_driver.</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">DesignateDriver(args=args)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">designate_driver.py", line 150, in __init__</span><br style="font-size:12.8px"><span style="font-size:12.8px">    super(DesignateDriver, self).__init__(name, args=args)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 1282, in __init__</span><br style="font-size:12.8px"><span style="font-size:12.8px">    super(PollingDataSourceDriver, self).__init__(name, args=args)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 324, in __init__</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self.initialize_translators()</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 1324, in initialize_translators</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self.register_translator(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">translator)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 457, in register_translator</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_translator(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">translator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 446, in _validate_translator</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_by_translation_</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">type(translator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 428, in _validate_by_translation_type</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_hdict_type(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">translator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 389, in _validate_hdict_type</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_translator(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">subtranslator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 446, in _validate_translator</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_by_translation_</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">type(translator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 428, in _validate_by_translation_type</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_hdict_type(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">translator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 386, in _validate_hdict_type</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self.check_params(field_</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">translator.keys(),</span><br style="font-size:12.8px"><span style="font-size:12.8px">AttributeError: 'str' object has no attribute 'keys'</span><br clear="all"><div><br></div><div>Thank you,</div><div class="gmail_signature"><div dir="ltr">Carmine</div></div>
</div></div>