def test_list_queued_images(self, mock_row_create, mock_images): """Verify that list_queued() method correctly processes images.""" mock_images.return_value = [{'image_id': '1'}, {'image_id': '2'}] cache_manage.list_queued(mock.Mock(), '') self.assertEqual(len(mock_images.return_value), mock_row_create.call_count)
def test_list_queued_images(self, mock_row_create, mock_images): """Verify that list_queued() method correctly processes images.""" mock_images.return_value = [ {'image_id': '1'}, {'image_id': '2'}] cache_manage.list_queued(mock.Mock(), '') self.assertEqual(len(mock_images.return_value), mock_row_create.call_count)
def test_list_queued_images_empty(self, mock_images): """ Verify that list_queued() method handles a case when no images were queued without errors. """ mock_images.return_value = [] self.assertEqual(cache_manage.SUCCESS, cache_manage.list_queued(mock.Mock(), ''))
def test_list_queued_images_empty(self, mock_images): """ Verify that list_queued() method handles a case when no images were queued without errors. """ mock_images.return_value = [] self.assertEqual(cache_manage.list_queued(mock.Mock(), ''), cache_manage.SUCCESS)