def test_applies_normal_mode_substitution():
    """Correctly applies a substitution that is not multiline."""
    raw = 'foo\n\n\n    bar something\n\n\n    the end'
    subbed = 'foo\n\n\nbar something\n\n\nthe end'
    pattern = '    '
    replacement = ''
    sub = substitute.Substitution(pattern, replacement, False)

    actual = sub.apply_and_get_result(raw)
    assert actual == subbed
Correctly applies a substitution that is not multiline.
test/substitute_test.py