示例#1
0
 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)
示例#2
0
 def test_profile_send(self):
     # Test
     agent = RestAgent(CONSUMER)
     print agent.profile.send()
     # Verify
     mock_agent.Profile.send.assert_called_once_with()
示例#3
0
 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)
示例#4
0
 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)
示例#5
0
 def test_unregistered(self):
     # Test
     agent = RestAgent(CONSUMER)
     agent.consumer.unregistered()
     # Verify
     mock_agent.Consumer.unregistered.assert_called_once_with()