1# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import unittest 6 7class PyIfTunTest(unittest.TestCase): 8 """Simple tests to validate that pyiftun is compiled and installed.""" 9 10 def testModuleLoads(self): 11 """Tests that the module loads. 12 13 Since this module is compiled from C, there are cases where the module 14 fails to load due to linkage problems. 15 """ 16 from lansim import pyiftun 17 18 def testConstantExpossed(self): 19 """Tests at least one constant is expossed from the module.""" 20 from lansim import pyiftun 21 self.assertTrue(hasattr(pyiftun, 'TUNSETIFF')) 22 23if __name__ == '__main__': 24 unittest.main() 25