class CurrentIpTest(unittest.TestCase):
    def setUp(self):
        ifconfig = create_autspec(ifconfig, )
        ifconfig = Mock(return_value = {'addr': '255.255.255.255',
                                        'brdaddr': '255.255.255.255',
                                        'hwaddr': '93:09:ff:ff:ff:ff',
                                        'netmask': '255.255.255.255'}
                       )
        self.current_ip = CurrentIp()
        self.current_ip.ifconfig = ifconfig

    def test_ip(self):
        self.assertEqual(self.current_ip.ip(), '255.255.255.255')

    def test_netmask(self):
        self.assertEqual(self.current_ip.netmask(), '255.255.255.255')
 def setUp(self):
     ifconfig = create_autspec(ifconfig, )
     ifconfig = Mock(return_value = {'addr': '255.255.255.255',
                                     'brdaddr': '255.255.255.255',
                                     'hwaddr': '93:09:ff:ff:ff:ff',
                                     'netmask': '255.255.255.255'}
                    )
     self.current_ip = CurrentIp()
     self.current_ip.ifconfig = ifconfig