fixing test on non ubuntu

This commit is contained in:
Tully Foote 2009-12-18 04:17:25 +00:00
parent d5b3098652
commit c57b5580ec
1 changed files with 4 additions and 2 deletions

View File

@ -135,8 +135,10 @@ class RoslibOsDetectTest(unittest.TestCase):
def test_ubuntu_in_OSA(self):
ubuntu = roslib.os_detect.Ubuntu()
ubuntu.check_presence = True
osa = roslib.os_detect.OSDetect()
def return_true():
return True
ubuntu.check_presence = return_true
osa = roslib.os_detect.OSDetect([ubuntu])
self.assertEqual("ubuntu", ubuntu.get_name())
os_class = osa.get_os()
self.assertEqual("ubuntu", os_class.get_name())