def test_cancel(self): # Test task_id = '123' agent = DirectAgent(CONSUMER) agent.cancel(task_id) # Verify criteria = {'eq': task_id} mock_agent.Admin.cancel.assert_called_once_with(criteria=criteria)
def test_update_content(self): # Test agent = DirectAgent(CONSUMER) result = agent.content.update(UNITS, OPTIONS) # Verify mock_agent.Content.update.assert_called_once_with(UNITS, OPTIONS)
def test_unbind(self): # Test agent = DirectAgent(CONSUMER) result = agent.consumer.unbind(BINDINGS, OPTIONS) # Verify mock_agent.Consumer.unbind.assert_called_once_with(BINDINGS, OPTIONS)
def test_unregistered(self): # Test agent = DirectAgent(CONSUMER) agent.consumer.unregistered() # Verify mock_agent.Consumer.unregistered.assert_called_once_with()
def test_profile_send(self): # Test agent = DirectAgent(CONSUMER) print agent.profile.send() # Verify mock_agent.Profile.send.assert_called_once_with()