summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-03-22 19:10:00 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-03-22 19:10:00 -0400
commita7a6b436600c764704f39e177938008c6f6b315f (patch)
tree38a55352f3338e6a56dfc1655cbe879f9f2d8e5a
parent8e10ab92df0d8b5d24474e00d6628d2de94b900c (diff)
downloadsqlalchemy-a7a6b436600c764704f39e177938008c6f6b315f.tar.gz
there's no "assert_call_count" on mock
-rw-r--r--test/engine/test_execute.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py
index 830b62531..d3ae309c3 100644
--- a/test/engine/test_execute.py
+++ b/test/engine/test_execute.py
@@ -1208,6 +1208,7 @@ class EngineEventsTest(fixtures.TestBase):
e2.execute(s2)
eq_([arg[1][1] for arg in canary.mock_calls], [s1, s1, s2])
+
def test_per_engine_plus_global(self):
canary = Mock()
event.listen(Engine, "before_execute", canary.be1)
@@ -1221,14 +1222,14 @@ class EngineEventsTest(fixtures.TestBase):
e2.connect()
e1.execute(select([1]))
- canary.be1.assert_call_count(1)
- canary.be2.assert_call_count(1)
+ eq_(canary.be1.call_count, 1)
+ eq_(canary.be2.call_count, 1)
e2.execute(select([1]))
- canary.be1.assert_call_count(2)
- canary.be2.assert_call_count(1)
- canary.be3.assert_call_count(2)
+ eq_(canary.be1.call_count, 2)
+ eq_(canary.be2.call_count, 1)
+ eq_(canary.be3.call_count, 2)
def test_per_connection_plus_engine(self):
canary = Mock()
@@ -1240,12 +1241,12 @@ class EngineEventsTest(fixtures.TestBase):
event.listen(conn, "before_execute", canary.be2)
conn.execute(select([1]))
- canary.be1.assert_call_count(1)
- canary.be2.assert_call_count(1)
+ eq_(canary.be1.call_count, 1)
+ eq_(canary.be2.call_count, 1)
conn._branch().execute(select([1]))
- canary.be1.assert_call_count(2)
- canary.be2.assert_call_count(2)
+ eq_(canary.be1.call_count, 2)
+ eq_(canary.be2.call_count, 2)
def test_cursor_events_ctx_execute_scalar(self):
canary = Mock()