summaryrefslogtreecommitdiffstats
path: root/test/t/test_ip.py
blob: 0be088c371680f31d05d57b6fcf56f70ba55a739 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import pytest


class TestIp:
    @pytest.mark.complete("ip ")
    def test_1(self, completion):
        assert completion

    @pytest.mark.complete("ip a ")
    def test_2(self, completion):
        assert completion

    @pytest.mark.complete("ip route replace ", require_cmd=True)
    def test_r_r(self, completion):
        assert completion

    @pytest.mark.complete(
        "ip monitor ",
        require_cmd=True,
        skipif="ip monitor help 2>/dev/null; (( $? != 255 ))",
    )
    def test_monitor(self, completion):
        assert "neigh" in completion
        assert "all" in completion

    @pytest.mark.complete("ip -", require_cmd=True)
    def test_options(self, completion):
        assert "-family" in completion