ericpp commented on pull request #14869:
URL: https://github.com/apache/airflow/pull/14869#issuecomment-804206437


   > @ericpp looks like the test needs to be updated:
   > 
   > ```python
   >      def set_autocommit(self, conn: MySQLConnectionTypes, autocommit: 
bool) -> None:
   >           """MySql connection sets autocommit in a different way."""
   >   >       if isinstance(conn.__class__.autocommit, property):  # 
mysql-connector-python
   >   E       AttributeError: type object 'MagicMock' has no attribute 
'autocommit'
   > ```
   
   Thanks. I'm still working on the tests. I'm having troubles getting that 
`isinstance` check to pass for the any of the mocking methods. I did get it to 
work by creating a custom class that has its own defined `autocommit` decorated 
property methods, but that class has no connection back to the 
`mysql-connector-python` class.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to