Home | History | Annotate | Download | only in net
      1 #!/usr/bin/python
      2 
      3 # TODO(chavey) complete all the unit test in this file
      4 
      5 import unittest, os, socket, time, sys
      6 import common
      7 from autotest_lib.client.bin import utils
      8 from autotest_lib.client.bin.net import net_tc, net_utils, net_utils_mock
      9 from autotest_lib.client.common_lib.test_utils import mock
     10 from autotest_lib.client.common_lib import error
     11 
     12 class TestNetUtils(unittest.TestCase):
     13     def setUp(self):
     14         self.god = mock.mock_god()
     15         self.god.stub_function(utils, "system")
     16         self.god.stub_function(utils, "system_output")
     17         os.environ['AUTODIR'] = "autodir"
     18 
     19 
     20     def tearDown(self):
     21         self.god.unstub_all()
     22         del os.environ['AUTODIR']
     23 
     24 
     25     #
     26     # test tcclass
     27     #
     28     def test_tcclass_get_leaf_qdisc(self):
     29         pass
     30 
     31 
     32     def test_tcclass_get_parent_class(self):
     33         pass
     34 
     35 
     36     def test_tcclass_set_parent_class(self):
     37         pass
     38 
     39 
     40     def test_tcclass_get_minor(self):
     41         pass
     42 
     43 
     44     def test_tcclass_id(self):
     45         pass
     46 
     47 
     48     def test_tcclass_add_child(self):
     49         pass
     50 
     51 
     52     def test_tcclass_setup(self):
     53         pass
     54 
     55 
     56     def test_tcclass_restore(self):
     57         pass
     58 
     59     #
     60     # test tcfilter
     61     #
     62     def test_tcfilter_get_parent_qdisc(self):
     63         pass
     64 
     65 
     66     def test_tcfilter_set_parent_qdisc(self):
     67         pass
     68 
     69 
     70     def test_tcfilter_get_dest_qdisc(self):
     71         pass
     72 
     73 
     74     def test_tcfilter_set_dest_qdisc(self):
     75         pass
     76 
     77 
     78     def test_tcfilter_get_protocol(self):
     79         pass
     80 
     81 
     82     def test_tcfilter_set_protocol(self):
     83         pass
     84 
     85 
     86     def test_tcfilter_get_priority(self):
     87         pass
     88 
     89 
     90     def test_tcfilter_set_priority(self):
     91         pass
     92 
     93 
     94     def test_tcfilter_get_handle(self):
     95         pass
     96 
     97 
     98     def test_tcfilter_set_handle(self):
     99         pass
    100 
    101 
    102     def test_tcfilter_tc_cmd(self):
    103         pass
    104 
    105 
    106     def test_tcfilter_setup(self):
    107         pass
    108 
    109 
    110     def test_tcfilter_restore(self):
    111         pass
    112 
    113     #
    114     # test u32filter
    115     #
    116     def test_u32filter_add_rule(self):
    117         pass
    118 
    119 
    120     def test_u32filter_setup(self):
    121         pass
    122 
    123 
    124     def test_u32filter_restore(self):
    125         pass
    126 
    127 
    128     #
    129     # test qdisc
    130     #
    131     def test_qdisc_add_class(self):
    132         pass
    133 
    134 
    135     def test_qdisc_add_filter(self):
    136         pass
    137 
    138 
    139     def test_qdisc_setup(self):
    140         pass
    141 
    142 
    143     def test_qdisc_restore(self):
    144         pass
    145 
    146 
    147     #
    148     # test prio
    149     #
    150     def test_prio_setup(self):
    151         pass
    152 
    153 
    154     def test_prio_get_class(self):
    155         pass
    156 
    157 
    158     #
    159     # test pfifo
    160     #
    161     def test_pfifo_setup(self):
    162         pass
    163 
    164 
    165     #
    166     # test netem
    167     #
    168     def test_netem_add_param(self):
    169         pass
    170 
    171 
    172     def test_netem_setup(self):
    173         pass
    174 
    175 
    176 if __name__ == "__main__":
    177     unittest.main()
    178