[test] Python 3.5 compatibility

Use assert_called_once_with() instead of assert_called_once() to
maintain compatibility with Python 3.5
This commit is contained in:
Tobias Witek 2020-01-26 14:17:14 +01:00
parent 2f78ee4beb
commit fbd44618dc

View file

@ -28,11 +28,11 @@ class widget(unittest.TestCase):
def test_callable_fulltext(self):
newWidget = core.widget.Widget(full_text=self.someCallback)
self.assertEqual(newWidget.full_text(), self.callbackReturnValue)
self.someCallback.assert_called_once()
self.someCallback.assert_called_once_with(unittest.mock.ANY)
def test_set_callable_fulltext(self):
self.someWidget.full_text(self.someCallback)
self.assertEqual(self.someWidget.full_text(), self.callbackReturnValue)
self.someCallback.assert_called_once()
self.someCallback.assert_called_once_with(unittest.mock.ANY)
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4