From 5111b2932e19f92ccc5d9092f6accf7af4e3ed62 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Mon, 1 May 2017 18:37:23 +0200 Subject: [PATCH] mocks work this way under py3.5, apparently. --- tests/test_basics.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_basics.py b/tests/test_basics.py index f6dccfa..4243cf2 100644 --- a/tests/test_basics.py +++ b/tests/test_basics.py @@ -1,4 +1,3 @@ -import pprint from unittest.mock import MagicMock import bonobo @@ -19,7 +18,7 @@ def test_count(): currified() currified.teardown() - context.send.assert_called_once() + assert len(context.method_calls) == 1 bag = context.send.call_args[0][0] assert isinstance(bag, bonobo.Bag) assert 0 == len(bag.kwargs)