Пример #1
0
def test_should_not_match_non_pyembed_link():
    md = Mock()

    re = PyEmbedPattern(None, md).getCompiledRegExp()
    match = re.match('[example](http://www.example.com)')

    assert not match
Пример #2
0
def test_should_match_pyembed_link_with_params():
    md = Mock()

    re = PyEmbedPattern(None, md).getCompiledRegExp()
    match = re.match('[!embed?param=value](http://www.example.com)')

    assert match