diff --git a/cliquet/tests/test_views_transaction.py b/cliquet/tests/test_views_transaction.py index 8d40701f..886dc139 100644 --- a/cliquet/tests/test_views_transaction.py +++ b/cliquet/tests/test_views_transaction.py @@ -1,7 +1,7 @@ import mock from cliquet.storage.exceptions import BackendError -from .support import BaseWebTest, unittest +from .support import BaseWebTest, unittest, skip_if_no_postgresql class PostgreSQLTest(BaseWebTest): @@ -12,8 +12,8 @@ def get_app_settings(self, extras=None): settings = super(PostgreSQLTest, self).get_app_settings(extras) settings.update(**PostgreSQLStorageTest.settings) settings.update(**PostgreSQLPermissionTest.settings) - settings.pop('storage_poolclass') - settings.pop('permission_poolclass') + settings.pop('storage_poolclass', None) + settings.pop('permission_poolclass', None) return settings def run_failing_batch(self): @@ -48,6 +48,7 @@ def run_failing_post(self): status=503) +@skip_if_no_postgresql class TransactionTest(PostgreSQLTest, unittest.TestCase): def test_storage_operations_are_committed_on_success(self): @@ -89,6 +90,7 @@ def test_modifications_are_rolled_back_on_error_accross_backends(self): self.assertEqual(len(resp.json['data']), 0) +@skip_if_no_postgresql class WithoutTransactionTest(PostgreSQLTest, unittest.TestCase): def get_app_settings(self, extras=None):