def test_get_notifier(self):
    rpc.NOTIFIER = mock.Mock()
    mock_prep = mock.Mock()
    mock_prep.return_value = 'notifier'
    rpc.NOTIFIER.prepare = mock_prep
    notifier = rpc.get_notifier('service', publisher_id='foo')
    mock_prep.assert_called_once_with(publisher_id='foo')
    self.assertEqual('notifier', notifier)
def test_get_notifier(self):
    rpc.NOTIFIER = mock.Mock()
    mock_prep = mock.Mock()
    mock_prep.return_value = 'notifier'
    rpc.NOTIFIER.prepare = mock_prep
    notifier = rpc.get_notifier('service', publisher_id='foo')
    mock_prep.assert_called_once_with(publisher_id='foo')
    self.assertEqual('notifier', notifier)