Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck committed Oct 6, 2023
1 parent 48bbf33 commit 2832a0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_deserialize_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# Copyright (c) OWASP Foundation. All Rights Reserved.

from datetime import datetime
from io import StringIO
from os.path import join
from typing import cast
from unittest.mock import Mock, patch
Expand Down Expand Up @@ -685,7 +686,7 @@ def _validate_xml_bom(self, bom: Bom, schema_version: SchemaVersion, fixture: st
if schema_version != LATEST_SUPPORTED_SCHEMA_VERSION:
# Rewind the BOM to only have data supported by the SchemaVersion in question
outputter = get_instance(bom=bom, output_format=OutputFormat.XML, schema_version=schema_version)
bom = cast(Bom, Bom.from_xml(outputter.output_as_string()))
bom = cast(Bom, Bom.from_xml(StringIO(outputter.output_as_string())))

with open(join(RELEVANT_TESTDATA_DIRECTORY, schema_version.to_version(), fixture)) as input_xml:
deserialized_bom = cast(Bom, Bom.from_xml(input_xml))
Expand Down
1 change: 1 addition & 0 deletions tests/test_real_world_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) OWASP Foundation. All Rights Reserved.

import unittest
from datetime import datetime
from os.path import join
Expand Down

0 comments on commit 2832a0f

Please sign in to comment.