Skip to content
Snippets Groups Projects
Commit 263b1d19 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

fixed failing tests, bumped version

parent bd42fc75
No related branches found
No related tags found
No related merge requests found
__version__ = '2.20.4' __version__ = '2.20.5a1'
import inspect import inspect
import logging import logging
from satella.coding import wraps
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
......
...@@ -28,30 +28,6 @@ class RealConnection: ...@@ -28,30 +28,6 @@ class RealConnection:
class TestDB(unittest.TestCase): class TestDB(unittest.TestCase):
def test_db(self): def test_db(self):
conn = RealConnection() 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) a = transaction(conn)
with a as cur: with a as cur:
self.assertEqual(conn.cursor_called, 1) self.assertEqual(conn.cursor_called, 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment