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", ""))
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', ''))
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)
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)