Merge "Fix python3.4 compatibility issue in yaql_expression.py"

This commit is contained in:
Jenkins 2016-11-07 22:52:27 +00:00 committed by Gerrit Code Review
commit 6eff14b838
2 changed files with 2 additions and 4 deletions

View File

@ -13,7 +13,7 @@
# under the License.
import re
import types
import six
import yaql
from yaql.language import exceptions as yaql_exc
@ -45,7 +45,7 @@ class YaqlExpression(object):
@staticmethod
def match(expr):
if not isinstance(expr, types.StringTypes):
if not isinstance(expr, six.string_types):
return False
if re.match('^[\s\w\d.:]*$', expr):
return False

View File

@ -13,7 +13,6 @@
# under the License.
import testtools
import unittest
from muranodashboard.dynamic_ui import yaql_expression
@ -38,7 +37,6 @@ class TestYaqlExpression(testtools.TestCase):
self.assertEqual("$foo", self.yaql_expr.expression())
self.assertEqual("test", self.str_expr.expression())
@unittest.skip('Skipping until bug #1636639 resolved.')
def test_match(self):
self.assertFalse(self.str_expr.match(12345))
self.assertFalse(self.str_expr.match(self.str_expr._expression))