From c133ea882219f7d22f4bd6b00a64d7e4cc369c98 Mon Sep 17 00:00:00 2001 From: Jaromir Hradilek Date: Fri, 22 Nov 2024 00:14:25 +0100 Subject: [PATCH] Simplified the test_task_structure() test. --- test/test_convert_to_task.py | 6 ++---- test/test_convert_to_task_generated.py | 22 ++++++++-------------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/test/test_convert_to_task.py b/test/test_convert_to_task.py index aef42b1..5a4c151 100644 --- a/test/test_convert_to_task.py +++ b/test/test_convert_to_task.py @@ -42,8 +42,7 @@ def test_task_structure(self):

Topic introduction

    -
  1. First step
  2. -
  3. Second step
  4. +
  5. Task step

Topic summary

@@ -61,6 +60,5 @@ def test_task_structure(self): self.assertTrue(task.xpath('boolean(/task/title[text()="Topic title"])')) self.assertTrue(task.xpath('boolean(/task/taskbody)')) self.assertTrue(task.xpath('boolean(/task/taskbody/context/p[text()="Topic introduction"])')) - self.assertTrue(task.xpath('boolean(/task/taskbody/steps/step[1]/cmd[text()="First step"])')) - self.assertTrue(task.xpath('boolean(/task/taskbody/steps/step[2]/cmd[text()="Second step"])')) + self.assertTrue(task.xpath('boolean(/task/taskbody/steps/step/cmd[text()="Task step"])')) self.assertTrue(task.xpath('boolean(/task/taskbody/result/p[text()="Topic summary"])')) diff --git a/test/test_convert_to_task_generated.py b/test/test_convert_to_task_generated.py index 7d0acfb..3440800 100644 --- a/test/test_convert_to_task_generated.py +++ b/test/test_convert_to_task_generated.py @@ -43,13 +43,11 @@ def test_task_structure(self):

Topic introduction

Prerequisites

Procedure

    -
  1. First step
  2. -
  3. Second step
  4. +
  5. Task step

Verification

Troubleshooting

    -
  1. First troubleshooting step
  2. -
  3. Second troubleshooting step
  4. +
  5. Troubleshooting step

Next steps