From d311f604c97c49253ec316fe206af8da2ca95d4d Mon Sep 17 00:00:00 2001 From: Michael Foord Date: Tue, 10 Jan 2012 00:22:44 +0000 Subject: Fix ANY equality with some types in assert_called_with calls --- tests/testhelpers.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/testhelpers.py b/tests/testhelpers.py index 345d648..51f8d13 100644 --- a/tests/testhelpers.py +++ b/tests/testhelpers.py @@ -10,6 +10,8 @@ from mock import ( mocksignature ) +from datetime import datetime + class SomeClass(object): def one(self, a, b): pass @@ -38,6 +40,13 @@ class AnyTest(unittest2.TestCase): self.assertEqual(str(ANY), '') + def test_any_and_datetime(self): + mock = Mock() + mock(datetime.now(), foo=datetime.now()) + + mock.assert_called_with(ANY, foo=ANY) + + class CallTest(unittest2.TestCase): -- cgit v1.2.1