Ejemplo n.º 1
0
def test_match():
    assert match(Mock(script='rm -rf /', stderr='add --no-preserve-root'),
                 None)
    assert not match(Mock(script='ls', stderr='add --no-preserve-root'), None)
    assert not match(
        Mock(script='rm --no-preserve-root /',
             stderr='add --no-preserve-root'), None)
    assert not match(Mock(script='rm -rf /', stderr=''), None)
Ejemplo n.º 2
0
def test_match():
    assert match(Command(script='rm -rf /', stderr='add --no-preserve-root'))
Ejemplo n.º 3
0
def test_not_match(command):
    assert not match(command)
Ejemplo n.º 4
0
def test_match():
    assert match(Command(script='rm -rf /',
                         stderr='add --no-preserve-root'))
Ejemplo n.º 5
0
def test_not_match(command):
    assert not match(command)
Ejemplo n.º 6
0
def test_match():
    assert match(Command('rm -rf /', 'add --no-preserve-root'))
Ejemplo n.º 7
0
def test_match():
    assert match(Command(script="rm -rf /", stderr="add --no-preserve-root"), None)
Ejemplo n.º 8
0
def test_match():
    assert match(Command("rm -rf /", "add --no-preserve-root"))