Package elisa :: Package core :: Package tests :: Module test_utils_network
[hide private]
[frames] | no frames]

Source Code for Module elisa.core.tests.test_utils_network

 1  # Elisa - Home multimedia server 
 2  # Copyright (C) 2006-2008 Fluendo Embedded S.L. (www.fluendo.com). 
 3  # All rights reserved. 
 4  # 
 5  # This file is available under one of two license agreements. 
 6  # 
 7  # This file is licensed under the GPL version 3. 
 8  # See "LICENSE.GPL" in the root of this distribution including a special 
 9  # exception to use Elisa with Fluendo's plugins. 
10  # 
11  # The GPL part of Elisa is also available under a commercial licensing 
12  # agreement from Fluendo. 
13  # See "LICENSE.Elisa" in the root directory of this distribution package 
14  # for details on that license. 
15   
16  from twisted.trial import unittest 
17  from elisa.core.tests.elisa_test_case import ElisaTestCase 
18  from elisa.core.utils import network 
19  import os, platform 
20   
21 -class TestNetwork(ElisaTestCase):
22
23 - def test_host_address(self):
24 25 if platform.system() == 'Windows': 26 raise unittest.SkipTest("Does not works under windows, need investigation") 27 28 # FIXME: linux/windows specific tests are not trivial here 29 host_address = network.get_host_address() 30 self.failUnless(host_address)
31
32 - def test_ip_address(self):
33 34 if platform.system() == 'Windows': 35 raise unittest.SkipTest("Does not works under windows, need investigation") 36 37 # FIXME: linux/windows specific tests are not trivial here 38 ip_address = network.get_ip_address() 39 print ip_address 40 self.failUnless(ip_address)
41