mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[FIX] fix tests failing in ci
This commit is contained in:
@@ -60,6 +60,7 @@ class TestBaseExternalDbsource(common.TransactionCase):
|
||||
|
||||
def test_connection_success(self):
|
||||
""" It should raise for successful connection """
|
||||
with mock.patch.object(self.dbsource, 'connection_open_postgresql'):
|
||||
with self.assertRaises(ConnectionSuccessError):
|
||||
self.dbsource.connection_test()
|
||||
|
||||
@@ -72,6 +73,7 @@ class TestBaseExternalDbsource(common.TransactionCase):
|
||||
|
||||
def test_connection_open_calls_close(self):
|
||||
""" It should close connection after context ends """
|
||||
with mock.patch.object(self.dbsource, 'connection_open_postgresql'):
|
||||
with mock.patch.object(
|
||||
self.dbsource, 'connection_close',
|
||||
) as close:
|
||||
|
||||
Reference in New Issue
Block a user