Example #1
0
 def test_not_installed(self, mock_is_service_installed, mock_sbd_name):
     mock_obj = mock.MagicMock()
     mock_is_service_installed.return_value = False
     mock_sbd_name.return_value = "sbd"
     self.assertFalse(lib_sbd.is_sbd_installed(mock_obj))
     mock_is_service_installed.assert_called_once_with(mock_obj, "sbd")
     mock_sbd_name.assert_called_once_with()
Example #2
0
 def test_not_installed(self, mock_is_service_installed, mock_sbd_name):
     mock_obj = mock.MagicMock()
     mock_is_service_installed.return_value = False
     mock_sbd_name.return_value = "sbd"
     self.assertFalse(lib_sbd.is_sbd_installed(mock_obj))
     mock_is_service_installed.assert_called_once_with(mock_obj, "sbd")
     mock_sbd_name.assert_called_once_with()
Example #3
0
 def test_installed(self, mock_sbd_name):
     mock_obj = mock.MagicMock()
     mock_obj.is_installed.return_value = True
     mock_sbd_name.return_value = self.service
     self.assertTrue(lib_sbd.is_sbd_installed(mock_obj))
     mock_obj.is_installed.assert_called_once_with(self.service)
     mock_sbd_name.assert_called_once_with(mock_obj)
Example #4
0
 def test_not_installed(self, mock_is_service_installed):
     mock_obj = mock.MagicMock()
     mock_is_service_installed.return_value = False
     self.assertFalse(lib_sbd.is_sbd_installed(mock_obj))
Example #5
0
 def test_not_installed(self, mock_is_service_installed):
     mock_obj = mock.MagicMock()
     mock_is_service_installed.return_value = False
     self.assertFalse(lib_sbd.is_sbd_installed(mock_obj))