Extend test coverage

This commit is contained in:
Adrià Gil Sorribes
2018-11-15 10:29:31 +01:00
parent 4832c3583e
commit 6efcc23630

View File

@@ -39,3 +39,12 @@ class TestBaseExternalDbsource(common.TransactionCase):
) as parent_method: ) as parent_method:
self.dbsource.execute_sqlite(*expect) self.dbsource.execute_sqlite(*expect)
parent_method.assert_called_once_with(*expect) parent_method.assert_called_once_with(*expect)
def test_execute_sqlit_without_sqlparams(self):
""" It should pass args to SQLAlchemy execute """
expect = 'sqlquery', None, 'metadata'
with mock.patch.object(
self.dbsource, '_execute_sqlalchemy'
) as parent_method:
self.dbsource.execute_sqlite(*expect)
parent_method.assert_called_once_with(*expect)