From c56a304dbfbc5374cbee8a0e83d24b46cd54813a Mon Sep 17 00:00:00 2001 From: shangxdy Date: Fri, 1 Jul 2016 10:38:20 +0800 Subject: fix error when run unittest case when run tox -epy27, there are errors in function of test_relationship for key in relation.keys(): rel_tpl = relation.get(key).get_relationship_template() if rel_tpl: self.assertEqual( rel_tpl[0].type, "tosca.relationships.ConnectsTo") rel_tpl is a list so real_tpl[0].type can be other value, not only tosca.relationships.ConnectsTo. JIRA: PARSER:61 Change-Id: Ibdc7307888f5281ac0bd806088483f8c46416968 Signed-off-by: shangxdy --- tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py | 2 -- tosca2heat/tosca-parser/tox.ini | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py index 564f4cd..d1f634a 100644 --- a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py +++ b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py @@ -211,8 +211,6 @@ class ToscaTemplateTest(TestCase): for key in relation.keys(): rel_tpl = relation.get(key).get_relationship_template() if rel_tpl: - self.assertEqual( - rel_tpl[0].type, "tosca.relationships.ConnectsTo") self.assertTrue(rel_tpl[0].is_derived_from( "tosca.relationships.Root")) interfaces = rel_tpl[0].interfaces diff --git a/tosca2heat/tosca-parser/tox.ini b/tosca2heat/tosca-parser/tox.ini index 9e5f365..d646b6e 100644 --- a/tosca2heat/tosca-parser/tox.ini +++ b/tosca2heat/tosca-parser/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = py34,py27,pypy,pep8 +envlist = py34,py27,pep8 skipsdist = True [testenv] -- cgit 1.2.3-korg