ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From emblempar...@apache.org
Subject [1/2] incubator-ariatosca git commit: More tests; improve parameter tests
Date Thu, 28 Sep 2017 20:13:50 GMT
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-1-parser-test-suite 62bb9f321 -> c953990f8


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c953990f/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_properties.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_properties.py
b/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_properties.py
new file mode 100644
index 0000000..5e06561
--- /dev/null
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_properties.py
@@ -0,0 +1,383 @@
+# -*- coding: utf-8 -*-
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Unified testing for properties and inputs.
+
+These tests are in addition to the common tests for parameters in test_type_parameters.py.
+"""
+
+import pytest
+
+from .test_type_parameters import (MACROS, CASES as PARAMETER_CASES)
+from ... import data
+from ......mechanisms.utils import matrix
+
+
+CASES = tuple(
+    (macros, name, parameter_section)
+    for macros, name, parameter_section in PARAMETER_CASES
+    if parameter_section != 'attributes'
+)
+
+
+# Required
+
+@pytest.mark.parametrize('macros,name,parameter_section,value', matrix(
+    CASES,
+    data.NOT_A_BOOL,
+    counts=(3, 1)
+))
+def test_type_parameter_required_syntax_type(parser, macros, name, parameter_section, value):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: string
+  required: {{ value }}
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section, value=value)).assert_failure()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section', CASES)
+def test_type_parameter_required(parser, macros, name, parameter_section):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: string
+  required: true
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section)).assert_success()
+
+
+# Status
+
+@pytest.mark.parametrize('macros,name,parameter_section,value', matrix(
+    CASES,
+    data.STATUSES,
+    counts=(3, 1)
+))
+def test_type_parameter_status(parser, macros, name, parameter_section, value):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: string
+  status: {{ value }}
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section, value=value)).assert_success()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section', CASES)
+def test_type_parameter_status_bad(parser, macros, name, parameter_section):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: string
+  status: not a status
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section)).assert_failure()
+
+
+# Constraints
+
+@pytest.mark.parametrize('macros,name,parameter_section,value', matrix(
+    CASES,
+    data.NOT_A_LIST,
+    counts=(3, 1)
+))
+def test_type_parameter_constraints_syntax_type(parser, macros, name, parameter_section,
value):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: string
+  constraints: {{ value }}
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section, value=value)).assert_failure()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section', CASES)
+def test_type_parameter_constraints_syntax_empty(parser, macros, name, parameter_section):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: string
+  constraints: []
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section)).assert_success()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section,constraint', matrix(
+    CASES,
+    data.CONSTRAINTS_WITH_VALUE,
+    counts=(3, 1)
+))
+def test_type_parameter_constraints_with_value(parser, macros, name, parameter_section, constraint):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+data_types:
+  MyDataType:
+    properties:
+      my_field:
+        type: string
+{%- if name != 'data' %}
+{{ name }}_types:
+{%- endif %}
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: MyDataType
+  constraints:
+    - {{ constraint }}: {my_field: a string}
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section, constraint=constraint)).assert_success()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section,constraint', matrix(
+    CASES,
+    data.CONSTRAINTS_WITH_VALUE_LIST,
+    counts=(3, 1)
+))
+def test_type_parameter_constraints_with_value_list(parser, macros, name, parameter_section,
+                                                    constraint):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+data_types:
+  MyDataType:
+    properties:
+      my_field:
+        type: string
+{%- if name != 'data' %}
+{{ name }}_types:
+{%- endif %}
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: MyDataType
+  constraints:
+    - {{ constraint }}:
+      - {my_field: string one}
+      - {my_field: string two}
+      - {my_field: string three}
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section, constraint=constraint)).assert_success()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section,constraint', matrix(
+    CASES,
+    data.CONSTRAINTS_WITH_VALUE_RANGE,
+    counts=(3, 1)
+))
+def test_type_parameter_constraints_with_value_range(parser, macros, name, parameter_section,
+                                                     constraint):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+data_types:
+  MyDataType:
+    properties:
+      my_field:
+        type: string
+{%- if name != 'data' %}
+{{ name }}_types:
+{%- endif %}
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: MyDataType
+  constraints:
+    - {{ constraint }}:
+      - {my_field: string a}
+      - {my_field: string b}
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section, constraint=constraint)).assert_success()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section,constraint', matrix(
+    CASES,
+    data.CONSTRAINTS_WITH_VALUE_RANGE,
+    counts=(3, 1)
+))
+def test_type_parameter_constraints_with_value_range_too_many(parser, macros, name,
+                                                              parameter_section, constraint):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+data_types:
+  MyDataType:
+    properties:
+      my_field:
+        type: string
+{%- if name != 'data' %}
+{{ name }}_types:
+{%- endif %}
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: MyDataType
+  constraints:
+    - {{ constraint }}:
+      - {my_field: string a}
+      - {my_field: string b}
+      - {my_field: string c}
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section, constraint=constraint)).assert_failure()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section,constraint', matrix(
+    CASES,
+    data.CONSTRAINTS_WITH_VALUE_RANGE,
+    counts=(3, 1)
+))
+def test_type_parameter_constraints_with_value_range_invalid(macros, parser, name,
+                                                             parameter_section, constraint):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+data_types:
+  MyDataType:
+    properties:
+      my_field:
+        type: string
+{%- if name != 'data' %}
+{{ name }}_types:
+{%- endif %}
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: MyDataType
+  constraints:
+    - {{ constraint }}:
+      - {my_field: string b}
+      - {my_field: string a}
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section, constraint=constraint)).assert_failure()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section', CASES)
+def test_type_parameter_constraints_pattern(parser, macros, name, parameter_section):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: string
+  constraints:
+    - pattern: ^pattern$
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section)).assert_success()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section', CASES)
+def test_type_parameter_constraints_pattern_bad(parser, macros, name, parameter_section):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: string
+  constraints:
+    - pattern: (
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section)).assert_failure()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section,constraint', matrix(
+    CASES,
+    data.CONSTRAINTS_WITH_NON_NEGATIVE_INT,
+    counts=(3, 1)
+))
+def test_type_parameter_constraints_with_integer(parser, macros, name, parameter_section,
+                                                 constraint):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: string
+  constraints:
+    - {{ constraint }}: 1
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section, constraint=constraint)).assert_success()
+
+
+@pytest.mark.parametrize('macros,name,parameter_section,constraint', matrix(
+    CASES,
+    data.CONSTRAINTS_WITH_NON_NEGATIVE_INT,
+    counts=(3, 1)
+))
+def test_type_parameter_constraints_with_integer_bad(parser, macros, name, parameter_section,
+                                                     constraint):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  MyType:
+{%- call parameters() %}
+my_parameter:
+  type: string
+  constraints:
+    - {{ constraint }}: -1
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section, constraint=constraint)).assert_failure()
+
+
+# Unicode
+
+@pytest.mark.parametrize('macros,name,parameter_section', CASES)
+def test_type_parameter_constraints_pattern_unicode(parser, macros, name, parameter_section):
+    parser.parse_literal(MACROS[macros] + """
+tosca_definitions_version: tosca_simple_yaml_1_0
+{{- additions() }}
+{{ name }}_types:
+  類型:
+{%- call parameters() %}
+參數:
+  type: string
+  constraints:
+    - pattern: ^模式$
+{% endcall %}
+""", dict(name=name, parameter_section=parameter_section)).assert_success()

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c953990f/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_types.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_types.py
b/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_types.py
index efa91c5..2e45d8a 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_types.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_types.py
@@ -20,14 +20,14 @@ from ... import data
 from ......mechanisms.utils import matrix
 
 
-TYPE_NAMES_NO_UNSUPPORTED_FIELDS = ('artifact', 'data', 'capability', 'relationship', 'node',
+CASES_WITHOUT_UNSUPPORTED_FIELDS = ('artifact', 'data', 'capability', 'relationship', 'node',
                                     'group', 'policy')
 
-TYPE_NAMES = TYPE_NAMES_NO_UNSUPPORTED_FIELDS + ('interface',)
+CASES = CASES_WITHOUT_UNSUPPORTED_FIELDS + ('interface',)
 
 
 @pytest.mark.parametrize('name,value', matrix(
-    TYPE_NAMES,
+    CASES,
     data.NOT_A_DICT
 ))
 def test_type_syntax_type(parser, name, value):
@@ -38,7 +38,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 """, dict(name=name, value=value)).assert_failure()
 
 
-@pytest.mark.parametrize('name', TYPE_NAMES_NO_UNSUPPORTED_FIELDS)
+@pytest.mark.parametrize('name', CASES_WITHOUT_UNSUPPORTED_FIELDS)
 def test_type_syntax_unsupported(parser, name):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0
@@ -48,7 +48,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 """, dict(name=name)).assert_failure()
 
 
-@pytest.mark.parametrize('name', TYPE_NAMES)
+@pytest.mark.parametrize('name', CASES)
 def test_type_syntax_empty(parser, name):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0
@@ -60,7 +60,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 # Description
 
 @pytest.mark.parametrize('name,value', matrix(
-    TYPE_NAMES,
+    CASES,
     data.NOT_A_STRING
 ))
 def test_type_description_syntax_type(parser, name, value):
@@ -72,7 +72,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 """, dict(name=name, value=value)).assert_failure()
 
 
-@pytest.mark.parametrize('name', TYPE_NAMES)
+@pytest.mark.parametrize('name', CASES)
 def test_type_description(parser, name):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0
@@ -85,7 +85,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 # Derived from
 
 @pytest.mark.parametrize('name,value', matrix(
-    TYPE_NAMES,
+    CASES,
     data.NOT_A_STRING
 ))
 def test_type_derived_from_syntax_type(parser, name, value):
@@ -97,7 +97,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 """, dict(name=name, value=value)).assert_failure()
 
 
-@pytest.mark.parametrize('name', TYPE_NAMES)
+@pytest.mark.parametrize('name', CASES)
 def test_type_derived_from(parser, name):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0
@@ -108,7 +108,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 """, dict(name=name)).assert_success()
 
 
-@pytest.mark.parametrize('name', TYPE_NAMES)
+@pytest.mark.parametrize('name', CASES)
 def test_type_derived_from_unknown(parser, name):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0
@@ -118,7 +118,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 """, dict(name=name)).assert_failure()
 
 
-@pytest.mark.parametrize('name', TYPE_NAMES)
+@pytest.mark.parametrize('name', CASES)
 def test_type_derived_from_self(parser, name):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0
@@ -128,7 +128,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 """, dict(name=name)).assert_failure()
 
 
-@pytest.mark.parametrize('name', TYPE_NAMES)
+@pytest.mark.parametrize('name', CASES)
 def test_type_derived_from_circular(parser, name):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0
@@ -145,7 +145,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 # Version
 
 @pytest.mark.parametrize('name,value', matrix(
-    TYPE_NAMES,
+    CASES,
     data.GOOD_VERSIONS
 ))
 def test_type_version(parser, name, value):
@@ -158,7 +158,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 
 
 @pytest.mark.parametrize('name,value', matrix(
-    TYPE_NAMES,
+    CASES,
     data.BAD_VERSIONS
 ))
 def test_type_version_bad(parser, name, value):
@@ -172,7 +172,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 
 # Unicode
 
-@pytest.mark.parametrize('name', TYPE_NAMES)
+@pytest.mark.parametrize('name', CASES)
 def test_type_unicode(parser, name):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c953990f/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_artifacts.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_artifacts.py
b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_artifacts.py
deleted file mode 100644
index b67b5e6..0000000
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_artifacts.py
+++ /dev/null
@@ -1,277 +0,0 @@
-# -*- coding: utf-8 -*-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import pytest
-
-from ... import data
-
-
-# TODO: properties
-
-
-# Artifacts section
-
-@pytest.mark.parametrize('value', data.NOT_A_DICT)
-def test_node_type_artifacts_section_syntax_type(parser, value):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-node_types:
-  MyType:
-    artifacts: {{ value }}
-""", dict(value=value)).assert_failure()
-
-
-def test_node_type_artifacts_section_syntax_empty(parser):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-node_types:
-  MyType:
-    artifacts: {}
-""").assert_success()
-
-
-# Artifact
-
-@pytest.mark.parametrize('value', data.NOT_A_DICT)
-def test_node_type_artifact_syntax_type(parser, value):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-node_types:
-  MyType:
-    artifacts:
-      my_artifact: {{ value }}
-""", dict(value=value)).assert_failure()
-
-
-def test_node_type_artifact_syntax_unsupported(parser):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-artifact_types:
-  MyType: {}
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: MyType
-        file: a file
-        unsupported: {}
-""").assert_failure()
-
-
-def test_node_type_artifact_syntax_empty(parser):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-node_types:
-  MyType:
-    artifacts:
-      my_artifact: {} # "type" and "file" are required
-""").assert_failure()
-
-
-# Type
-
-@pytest.mark.parametrize('value', data.NOT_A_STRING)
-def test_node_type_artifact_type_syntax_type(parser, value):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: {{ value }}
-        file: a file
-""", dict(value=value)).assert_failure()
-
-
-def test_node_type_artifact_type_unknown(parser):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: UnknownType
-        file: a file
-""").assert_failure()
-
-
-# File
-
-@pytest.mark.parametrize('value', data.NOT_A_STRING)
-def test_node_type_artifact_file_syntax_type(parser, value):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-artifact_types:
-  MyType: {}
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: MyType
-        file: {{ value }}
-""", dict(value=value)).assert_failure()
-
-
-def test_node_type_artifact_file(parser):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-artifact_types:
-  MyType: {}
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: MyType
-        file: a file
-""").assert_success()
-
-
-# Description
-
-@pytest.mark.parametrize('value', data.NOT_A_STRING)
-def test_node_type_artifact_description_syntax_type(parser, value):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-artifact_types:
-  MyType: {}
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: MyType
-        file: a file
-        description: {{ value }}
-""", dict(value=value)).assert_failure()
-
-
-def test_node_type_artifact_description(parser):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-artifact_types:
-  MyType: {}
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: MyType
-        file: a file
-        description: a description
-""").assert_success()
-
-
-# Repository
-
-@pytest.mark.parametrize('value', data.NOT_A_STRING)
-def test_node_type_artifact_repository_syntax_type(parser, value):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-artifact_types:
-  MyType: {}
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: MyType
-        file: a file
-        repository: {{ value }}
-""", dict(value=value)).assert_failure()
-
-
-def test_node_type_artifact_repository_unknown(parser):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-artifact_types:
-  MyType: {}
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: MyType
-        file: a file
-        repository: unknown
-""").assert_failure()
-
-
-def test_node_type_artifact_repository(parser):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-repositories:
-  my_repository:
-    url: a url
-artifact_types:
-  MyType: {}
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: MyType
-        file: a file
-        repository: my_repository
-""").assert_success()
-
-
-# Deploy path
-
-@pytest.mark.parametrize('value', data.NOT_A_STRING)
-def test_node_type_artifact_deploy_path_syntax_type(parser, value):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-artifact_types:
-  MyType: {}
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: MyType
-        file: a file
-        deploy_path: {{ value }}
-""", dict(value=value)).assert_failure()
-
-
-def test_node_type_artifact_deploy_path(parser):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-artifact_types:
-  MyType: {}
-node_types:
-  MyType:
-    artifacts:
-      my_artifact:
-        type: MyType
-        file: a file
-        deploy_path: a path
-""").assert_success()
-
-
-# Unicode
-
-def test_node_type_artifact_unicode(parser):
-    parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-repositories:
-  知識庫:
-    url: 網址
-artifact_types:
-  類型: {}
-node_types:
-  類型:
-    artifacts:
-      神器:
-        type: 類型
-        file: 文件
-        repository: 知識庫
-        deploy_path: 路徑
-""").assert_success()

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c953990f/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_capabilities.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_capabilities.py
b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_capabilities.py
index 1a60b54..c3491d1 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_capabilities.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_capabilities.py
@@ -19,9 +19,6 @@ import pytest
 from ... import data
 
 
-PARAMETER_SECTION_NAMES = ('properties', 'attributes')
-
-
 # Capabilities section
 
 @pytest.mark.parametrize('value', data.NOT_A_DICT)


Mime
View raw message