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