Example #1
0
class  Net_tx_rx_TestCase(unittest.TestCase):
    def setUp(self):
        self.foo = NetTxRx()

    def test_net_tx_rx_(self):
        self.assertEquals(['0', '0'], self.foo.check())
        time.sleep(2)
        self.assertNotEquals(['0', '0'], self.foo.check())
        time.sleep(2)
        print self.foo.check()

    def test_net_tx_rx_cols(self):
        res = self.foo.columns()
        self.assertEquals(['Net_tx', 'Net_rx', ], res)
Example #2
0
class NetTxRxTestCase(unittest.TestCase):
    def setUp(self):
        self.foo = NetTxRx()

    def test_net_tx_rx_(self):
        self.assertEquals(['0', '0'], self.foo.check())
        time.sleep(2)
        self.assertNotEquals(['0', '0'], self.foo.check())
        socket.gethostbyname("google.com")
        socket.create_connection(("google.com", 80), 5000)
        time.sleep(2)
        print self.foo.check()

    def test_net_tx_rx_cols(self):
        res = self.foo.columns()
        self.assertEquals(['Net_tx', 'Net_rx', ], res)
Example #3
0
class NetTxRxTestCase(unittest.TestCase):
    def setUp(self):
        self.foo = NetTxRx()

    def test_net_tx_rx_(self):
        self.assertEquals(['0', '0'], self.foo.check())
        time.sleep(2)
        # travis! self.assertNotEquals(['0', '0'], self.foo.check())
        socket.gethostbyname("google.com")
        socket.create_connection(("google.com", 80), 5000)
        time.sleep(2)
        print self.foo.check()

    def test_net_tx_rx_cols(self):
        res = self.foo.columns()
        self.assertEquals(['Net_tx', 'Net_rx', ], res)
Example #4
0
class Net_tx_rx_TestCase(unittest.TestCase):
    def setUp(self):
        self.foo = NetTxRx()

    def test_net_tx_rx_(self):
        self.assertEquals(['0', '0'], self.foo.check())
        time.sleep(2)
        self.assertNotEquals(['0', '0'], self.foo.check())
        time.sleep(2)
        print self.foo.check()

    def test_net_tx_rx_cols(self):
        res = self.foo.columns()
        self.assertEquals([
            'Net_tx',
            'Net_rx',
        ], res)
Example #5
0
 def setUp(self):
     self.foo = NetTxRx()
Example #6
0
 def setUp(self):
     self.foo = NetTxRx()