Esempio n. 1
0
def test_parse_template_2():
    actual_stripped, actual_parts = parse_template("I the {Adjective} and{Adjective} {A First Name} have {Past Tense Verb}{A First Name}")
    expected_stripped = "I the {} and{} {} have {}{}"
    expected_parts = ['Adjective', 'Adjective', 'A First Name', 'Past Tense Verb', 'A First Name']

    assert actual_stripped == expected_stripped
    assert actual_parts == expected_parts
Esempio n. 2
0
def test_parse_template():
    actual_stripped, actual_parts = parse_template(
        "It was a {Adjective} and {Adjective} {Noun}.")
    expected_stripped = "It was a {} and {} {}."
    expected_parts = ("Adjective", "Adjective", "Noun")

    assert actual_stripped == expected_stripped
    assert actual_parts == expected_parts