From 480713b6f32b2416b4feaf8f85471f5075622144 Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Mon, 9 Nov 2015 00:07:10 +0100 Subject: [PATCH] Test fix --- cliquet/tests/test_views_transaction.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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):