Merge "Fix python3.4 compatibility issue in yaql_expression.py"
This commit is contained in:
commit
6eff14b838
@ -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
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user