def test_leader_elected(self, mock_write, mock_update):
     hooks.leader_elected()
     mock_write.assert_has_calls([call(utils.TOKEN_FLUSH_CRON_FILE)])
 def test_leader_elected(self, mock_write):
     hooks.leader_elected()
     mock_write.assert_has_calls([call(utils.TOKEN_FLUSH_CRON_FILE)])