def test_nested_braces(self): assert list(get_python_expressions( '''${resource_url(_query={'one': 'one'})}''', 'python')) == \ ['''resource_url(_query={'one': 'one'})''']
def test_single_expression(self): assert list(get_python_expressions('${some_python}', 'python')) == ['some_python']
def test_two_expressions(self): assert list(get_python_expressions('${one} ${two}', 'python')) == ['one', 'two']
def test_nested_braces(self): assert list(get_python_expressions("""${resource_url(_query={'one': 'one'})}""", "python")) == [ """resource_url(_query={'one': 'one'})""" ]
def test_no_expressions(self): assert list(get_python_expressions('no python here', 'python')) == []
def test_single_expression(self): assert list(get_python_expressions("${some_python}", "python")) == ["some_python"]
def test_two_expressions(self): assert list(get_python_expressions("${one} ${two}", "python")) == ["one", "two"]
def test_no_expressions(self): assert list(get_python_expressions("no python here", "python")) == []