mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[IMP] base_external_dbsource_mysql: Don't depend on SQLite
The amount of shared code is so insignificant, that it doesn't worth to depend on base_external_dbsource_sqlite.
This commit is contained in:
@@ -26,7 +26,7 @@ class TestBaseExternalDbsource(common.TransactionCase):
|
||||
def test_connection_open_mysql(self):
|
||||
""" It should call SQLAlchemy open """
|
||||
with mock.patch.object(
|
||||
self.dbsource, '_connection_open_sqlalchemy'
|
||||
self.dbsource, 'connection_open_mysql'
|
||||
) as parent_method:
|
||||
self.dbsource.connection_open_mysql()
|
||||
parent_method.assert_called_once_with()
|
||||
@@ -35,7 +35,7 @@ class TestBaseExternalDbsource(common.TransactionCase):
|
||||
""" It should pass args to SQLAlchemy execute """
|
||||
expect = 'sqlquery', 'sqlparams', 'metadata'
|
||||
with mock.patch.object(
|
||||
self.dbsource, '_execute_sqlalchemy'
|
||||
self.dbsource, 'execute_mysql'
|
||||
) as parent_method:
|
||||
self.dbsource.execute_mysql(*expect)
|
||||
parent_method.assert_called_once_with(*expect)
|
||||
|
||||
Reference in New Issue
Block a user