Esempio n. 1
0
 def test_enabled(self):
     '''
     Test for Return True if the named service is enabled, false otherwise
     '''
     mock = MagicMock(return_value=['A'])
     with patch.object(debian_service, 'get_enabled', mock):
         self.assertFalse(debian_service.enabled('name'))
Esempio n. 2
0
 def test_enabled(self):
     '''
     Test for Return True if the named service is enabled, false otherwise
     '''
     mock = MagicMock(return_value=['A'])
     with patch.object(debian_service, 'get_enabled', mock):
         self.assertFalse(debian_service.enabled('name'))
 def test_enabled(self):
     """
     Test for Return True if the named service is enabled, false otherwise
     """
     mock = MagicMock(return_value=["A"])
     with patch.object(debian_service, "get_enabled", mock):
         self.assertFalse(debian_service.enabled("name"))
Esempio n. 4
0
 def test_enabled(self):
     mock = MagicMock(return_value=["foo"])
     with patch.object(debian_service, "get_enabled", mock):
         assert debian_service.enabled("foo")
         assert not debian_service.enabled("bar")