Esempio n. 1
0
 def test_disabled(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.disabled('name'))
Esempio n. 2
0
 def test_disabled(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.disabled('name'))
 def test_disabled(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.disabled("name"))
Esempio n. 4
0
 def test_disabled(self):
     mock = MagicMock(return_value=["foo"])
     with patch.object(debian_service, "get_disabled", mock):
         assert debian_service.disabled("foo")
         assert not debian_service.disabled("bar")