From 263b1d1906eb7e0bf7a02a1bcc98a5c41d1a4ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Mon, 30 May 2022 22:07:22 +0200 Subject: [PATCH] fixed failing tests, bumped version --- satella/__init__.py | 2 +- satella/db.py | 2 -- tests/test_db.py | 24 ------------------------ 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/satella/__init__.py b/satella/__init__.py index 59a0bf77..2d04f7ae 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.20.4' +__version__ = '2.20.5a1' diff --git a/satella/db.py b/satella/db.py index 805fd66c..6884ee41 100644 --- a/satella/db.py +++ b/satella/db.py @@ -1,8 +1,6 @@ import inspect import logging -from satella.coding import wraps - logger = logging.getLogger(__name__) diff --git a/tests/test_db.py b/tests/test_db.py index c6a1bb99..b1390b9b 100644 --- a/tests/test_db.py +++ b/tests/test_db.py @@ -28,30 +28,6 @@ class RealConnection: class TestDB(unittest.TestCase): def test_db(self): conn = RealConnection() - - @transaction(conn) - def test(cur): - pass - - test() - - self.assertEqual(conn.cursor_called, 1) - self.assertEqual(conn.commit_called, 1) - - def test_db_imba(self): - conn = RealConnection() - - @transaction(conn) - def test(cur): - raise ValueError() - - test() - - self.assertEqual(conn.cursor_called, 1) - self.assertEqual(conn.rollback_called, 1) - - def test_db2(self): - conn = RealConnection() a = transaction(conn) with a as cur: self.assertEqual(conn.cursor_called, 1) -- GitLab