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