def METHOD_NAME(self):
    expected_id = 1
    repo = HousingProviderRepository(None)
    mock_session = MagicMock()
    mock_query = MagicMock()
    mock_query.first.return_value = True
    mock_query.delete.return_value = 1
    repo._get_session = lambda: mock_session
    repo._get_query_by_id = lambda x, y: mock_query
    row_deleted = repo.delete_service_provider(expected_id)
    assert row_deleted == True
    mock_query.first.assert_called_once()
    mock_query.delete.assert_called_once()
    mock_session.commit.assert_called_once()
    mock_session.close.assert_called_once()