Example #1
0
 def test_missing(self):
     '''
     Test for The inverse of service.available.
     '''
     mock = MagicMock(return_value=['A'])
     with patch.object(debian_service, 'get_all', mock):
         self.assertTrue(debian_service.missing('name'))
Example #2
0
 def test_missing(self):
     '''
     Test for The inverse of service.available.
     '''
     mock = MagicMock(return_value=['A'])
     with patch.object(debian_service, 'get_all', mock):
         self.assertTrue(debian_service.missing('name'))
 def test_missing(self):
     """
     Test for The inverse of service.available.
     """
     mock = MagicMock(return_value=["A"])
     with patch.object(debian_service, "get_all", mock):
         self.assertTrue(debian_service.missing("name"))
Example #4
0
 def test_missing(self):
     get_all = MagicMock(return_value=["foo", "bar", "baz"])
     with patch.object(debian_service, "get_all", get_all):
         assert debian_service.missing("qux")
         assert not debian_service.missing("foo")