Skip to content

fix: test_tool_document_to_oscal_with_hyphenated_tool_id fails with missing ltype argument #882

@shiwani42

Description

@shiwani42

Issue

What is the issue?

test_tool_document_to_oscal_with_hyphenated_tool_id in application/tests/oscal_utils_test.py (line 224) constructs a defs.Link without passing the required ltype argument. The Link dataclass was updated to make ltype a required positional argument, but the test was not updated accordingly.

Expected Behaviour

The test should pass by providing a valid ltype argument when constructing defs.Link.

Actual Behaviour

The test raises a TypeError and fails:

TypeError: Link.__init__() missing 1 required positional argument: 'ltype'

Steps to reproduce

python3 -m pytest application/tests/oscal_utils_test.py::TestOSCALUtils::test_tool_document_to_oscal_with_hyphenated_tool_id -v

Suggested fix: Add ltype=defs.LinkTypes.LinkedTo to the defs.Link(...) constructor call in application/tests/oscal_utils_test.py line 224.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions