Skip to content

Add tests for legal utility functions #6926

@patphongs

Description

@patphongs

Utility functions like transform_ecfr_query_string, get_legal_category_order, and get_s3_client need coverage.

Test coverage needed:

fec/legal/tests/test_legal_utils.py

class TestQueryTransformation(TestCase):
def test_transform_ecfr_query_string_removes_plus()
def test_transform_ecfr_query_string_handles_empty()

class TestCategoryOrder(TestCase):
def test_get_legal_category_order_with_all_results()
def test_get_legal_category_order_with_empty_results()
def test_get_legal_category_order_moves_selected_to_top()
def test_get_legal_category_order_defaults_to_admin_fines()

class TestS3Client(TestCase):
@mock.patch('boto3.client')
def test_get_s3_client_configuration()

Completion criteria

  • ransform_ecfr_query_string, get_legal_category_order, and get_s3_client now have test coverage

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🔜 Sprint backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions