Exemple #1
0
def test_non_primary_simple_known_module():
    expected = [
        "0000dead0000beef:MyModule:MyTemplate",
        "0000dead0000beef:*",
        "*:MyModule:MyTemplate",
        "*:*",
    ]
    actual = matching_normalizations("0000dead0000beef:MyModule:MyTemplate")
    assert actual == expected
Exemple #2
0
def test_non_primary_simple_unknown_module():
    expected = ["*:MyModule:MyTemplate", "*:*"]
    actual = matching_normalizations("*:MyModule:MyTemplate")
    assert actual == expected
Exemple #3
0
def test_non_primary_simple_unknown_module_rejects_deprecated_style():
    with pytest.raises(ValueError):
        # Period forms for template names are explicitly not allowed in the new API
        matching_normalizations("*:MyModule.MyTemplate")
Exemple #4
0
def test_star_star_matching_normalizations():
    expected = ["*:*"]
    actual = matching_normalizations("*:*")
    assert actual == expected