class TestParameterNode(TestCase):
    def setUp(self):
        self.attributes = {"name": "test_name", "type": "test_type"}
        self.node = ParameterNode(None, "parameter", self.attributes)
        self.node.children.append(CharNode(None, "test_data"))

    def test_get_table_row(self):
        output = self.node.get_table_row()
        self.assertIn("test_name", output)
        self.assertIn("Test_type", output)
        self.assertIn("test_data", output)

    def test_format_template_type_names(self):
        self.node.attributes['style'] = 'template'
        output = self.node.get_table_row()
        self.assertIn("{test_name}", output)
示例#2
0
class TestParameterNode(TestCase):

    def setUp(self):
        self.attributes = {"name": "test_name", "type": "test_type"}
        self.node = ParameterNode(None, "parameter", self.attributes)
        self.node.children.append(CharNode(None, "test_data"))

    def test_get_table_row(self):
        output = self.node.get_table_row()
        self.assertIn("test_name", output)
        self.assertIn("test_type", output)
        self.assertIn("test_data", output)

    def test_format_template_type_names(self):
        self.node.attributes['style'] = 'template'
        output = self.node.get_table_row()
        self.assertIn("{test_name}", output)
示例#3
0
 def setUp(self):
     self.attributes = {"name": "test_name", "type": "test_type"}
     self.node = ParameterNode(None, "parameter", self.attributes)
     self.node.children.append(CharNode(None, "test_data"))
 def setUp(self):
     self.attributes = {"name": "test_name", "type": "test_type"}
     self.node = ParameterNode(None, "parameter", self.attributes)
     self.node.children.append(CharNode(None, "test_data"))