Change assertCalledWith to assert_called_with

In test_ptime() 2 uses of the former failed to assert with bogus
values used in the assert.  Using assert_called_with() instead
correctly performs the assertion.

Change-Id: Idbd918f8e8d3ec5a4110725b949710fb54b4ba9a
This commit is contained in:
Paul Luse 2014-06-10 08:08:13 -07:00
parent c384d76c57
commit d32169c9c8

@ -118,11 +118,11 @@ class TestRecon(unittest.TestCase):
timestamp = self.recon_instance._ptime(1387274400)
self.assertEqual(timestamp, "2013-12-17 10:00:00")
mock_localtime.assertCalledWith(1387274400)
mock_localtime.assert_called_with(1387274400)
timestamp2 = self.recon_instance._ptime()
self.assertEqual(timestamp2, "2013-12-17 10:00:00")
mock_localtime.assertCalledWith()
mock_localtime.assert_called_with()
def test_get_devices(self):
ringbuilder = builder.RingBuilder(2, 3, 1)