Python3 mock doesn't have assert_called_once
Oops. With python 2.x we use pypi's mock module but with python 3.x it's built in (under unittest.mock). I thought Python bundled an exact copy of the upstream module but seems it doesn't include the assert_called_once method... ====================================================================== ERROR: test_event_listing_with_malformed_event ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.5/unittest/mock.py", line 1157, in patched return func(*args, **keywargs) File "/home/atagar/Desktop/stem/test/unit/control/controller.py", line 688, in test_event_listing_with_malformed_event self.malformed_listener.assert_called_once() File "/usr/lib/python3.5/unittest/mock.py", line 583, in __getattr__ raise AttributeError(name) AttributeError: assert_called_once
parent
c9cc0f55
Please register or sign in to comment