Beispiel #1
0
def test_match():
    assert match(Command(script='ls'), None)
    assert match(Command(script='ls file.py'), None)
    assert match(Command(script='ls /opt'), None)
    assert not match(Command(script='ls -lah /opt'), None)
    assert not match(Command(script='pacman -S binutils'), None)
    assert not match(Command(script='lsof'), None)
Beispiel #2
0
def test_match():
    assert match(Command(script='ls'), None)
    assert match(Command(script='ls file.py'), None)
    assert match(Command(script='ls /opt'), None)
    assert not match(Command(script='ls -lah /opt'), None)
    assert not match(Command(script='pacman -S binutils'), None)
    assert not match(Command(script='lsof'), None)
def test_match():
    assert match(Command("ls", ""))
    assert match(Command("ls file.py", ""))
    assert match(Command("ls /opt", ""))
    assert not match(Command("ls -lah /opt", ""))
    assert not match(Command("pacman -S binutils", ""))
    assert not match(Command("lsof", ""))
Beispiel #4
0
def test_match():
    assert match(Command('ls', ''))
    assert match(Command('ls file.py', ''))
    assert match(Command('ls /opt', ''))
    assert not match(Command('ls -lah /opt', ''))
    assert not match(Command('pacman -S binutils', ''))
    assert not match(Command('lsof', ''))
Beispiel #5
0
def test_match():
    assert match(Mock(script="ls file.py"), None)
    assert match(Mock(script="ls /opt"), None)
    assert not match(Mock(script="ls -lah /opt"), None)
Beispiel #6
0
def test_match():
    assert match(Mock(script='ls file.py'), None)
    assert match(Mock(script='ls /opt'), None)
    assert not match(Mock(script='ls -lah /opt'), None)