"""Unit tests for Ledger Correction handlers.""" from unittest.mock import patch from owsresponse import response @patch('ledger.blueprints.ledger_correction.logic') def test_bulk_create_ledger_correction( mock_logic, fixture_client, mock_bulk_ledger_correction_request_body ): """Test to create bulk entries for ledger_correction.""" post_body = mock_bulk_ledger_correction_request_body mock_logic.bulk_create.return_value = response.Response(message='OK', status=201) res = fixture_client.post('/ledger-correction/bulk', json=post_body) mock_logic.bulk_create.assert_called_once() assert res.status_code == 201