Exemplo n.º 1
0
    def test_task_header_agent_bind(self):
        # Setup
        sim = task_simulator.TaskSimulator()

        task = sim.add_task_state('2', responses.STATE_FINISHED)
        task.tags = [tags.action_tag(tags.ACTION_AGENT_BIND)]

        # Test
        self.command.task_header(task)

        # Verify
        self.assertEqual(self.prompt.get_write_tags(), ['agent-bind-header'])
Exemplo n.º 2
0
    def test_task_header_delete_binding(self):
        # Setup
        sim = task_simulator.TaskSimulator()

        task = sim.add_task_state('3', responses.STATE_FINISHED)
        task.tags = [tags.action_tag(tags.ACTION_DELETE_BINDING)]

        # Test
        self.command.task_header(task)

        # Verify
        self.assertEqual(self.prompt.get_write_tags(), ['delete-header'])