Ejemplo n.º 1
0
 def test_nested_braces(self):
     assert list(get_python_expressions(
         '''${resource_url(_query={'one': 'one'})}''', 'python')) == \
         ['''resource_url(_query={'one': 'one'})''']
Ejemplo n.º 2
0
 def test_single_expression(self):
     assert list(get_python_expressions('${some_python}', 'python')) == ['some_python']
Ejemplo n.º 3
0
 def test_two_expressions(self):
     assert list(get_python_expressions('${one} ${two}', 'python')) == ['one', 'two']
Ejemplo n.º 4
0
 def test_nested_braces(self):
     assert list(get_python_expressions("""${resource_url(_query={'one': 'one'})}""", "python")) == [
         """resource_url(_query={'one': 'one'})"""
     ]
Ejemplo n.º 5
0
 def test_no_expressions(self):
     assert list(get_python_expressions('no python here', 'python')) == []
Ejemplo n.º 6
0
 def test_single_expression(self):
     assert list(get_python_expressions("${some_python}", "python")) == ["some_python"]
Ejemplo n.º 7
0
 def test_two_expressions(self):
     assert list(get_python_expressions("${one} ${two}", "python")) == ["one", "two"]
Ejemplo n.º 8
0
 def test_no_expressions(self):
     assert list(get_python_expressions("no python here", "python")) == []
Ejemplo n.º 9
0
 def test_nested_braces(self):
     assert list(get_python_expressions(
         '''${resource_url(_query={'one': 'one'})}''', 'python')) == \
         ['''resource_url(_query={'one': 'one'})''']
Ejemplo n.º 10
0
 def test_two_expressions(self):
     assert list(get_python_expressions('${one} ${two}',
                                        'python')) == ['one', 'two']
Ejemplo n.º 11
0
 def test_single_expression(self):
     assert list(get_python_expressions('${some_python}',
                                        'python')) == ['some_python']
Ejemplo n.º 12
0
 def test_no_expressions(self):
     assert list(get_python_expressions('no python here', 'python')) == []