Commit 1932bde9 authored by lopezaguilar's avatar lopezaguilar
Browse files

Refactoring code to organize the generation of the documentation of the Test Cases

parent 56c7bc43
Loading
Loading
Loading
Loading

doc/__init__.py

0 → 100644
+0 −0

Empty file added.

+0 −0

Empty file added.

+0 −0

File moved.

+10 −5
Original line number Diff line number Diff line
from os import getcwd
from robot.api import TestSuiteBuilder
from parserobotfile import ParseRobotFile
from parseapiutilsfile import ParseApiUtilsFile
from doc.analysis.parserobotfile import ParseRobotFile
from doc.analysis.parseapiutilsfile import ParseApiUtilsFile
import re


@@ -220,13 +220,18 @@ class GenerateRobotData:

        # Get the Content-Type and Body associated to the Test
        if len(self.args) != 0:
            # We are talking about Test Cases with Test Template, so we need to check the keyword content with the
            # definition of the template
            params = self.args[test.name]
            index = [index for index, value in enumerate(self.arguments) if value == '${content_type}'][0]
            content_type = params[index]

            body = self.get_body(string=test.name)

            # Generate Checks for Test Data
            then = self.robot.get_checks(test_name=test.template, apiutils=self.apiutil)
        else:
            # Need to develop this case
            # We are talking about a Test Cases without Test Template
            content_type = ''
            body = ''

Loading