Skip to content

Commit 26366a4

Browse files
committed
test: mock ThisTool.version for constisten results
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent 11a420c commit 26366a4

File tree

92 files changed

+91
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+91
-97
lines changed

tests/base.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,6 @@ def assertEqualXmlBom(self, a: str, b: str, namespace: str) -> None:
161161
if metadata_ts_b is not None:
162162
metadata_ts_b.text = now.isoformat()
163163

164-
# Align 'this' Tool Version
165-
this_tool = ba.find('.//*/{{{}}}tool[{{{}}}version="VERSION"]'.format(namespace, namespace))
166-
if this_tool is not None:
167-
this_tool.find('./{{{}}}version'.format(namespace)).text = cyclonedx_lib_version
168-
this_tool = bb.find('.//*/{{{}}}tool[{{{}}}version="VERSION"]'.format(namespace, namespace))
169-
if this_tool is not None:
170-
this_tool.find('./{{{}}}version'.format(namespace)).text = cyclonedx_lib_version
171-
172164
self.assertEqualXml(
173165
xml.etree.ElementTree.tostring(ba, 'unicode'),
174166
xml.etree.ElementTree.tostring(bb, 'unicode')

tests/fixtures/json/1.2/bom_dependencies.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"vendor": "CycloneDX",
1212
"name": "cyclonedx-python-lib",
13-
"version": "3.1.2"
13+
"version": "TESTING"
1414
}
1515
]
1616
},

tests/fixtures/json/1.2/bom_dependencies_component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"vendor": "CycloneDX",
1212
"name": "cyclonedx-python-lib",
13-
"version": "3.1.2"
13+
"version": "TESTING"
1414
}
1515
],
1616
"component": {

tests/fixtures/json/1.2/bom_external_references.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"vendor": "CycloneDX",
1212
"name": "cyclonedx-python-lib",
13-
"version": "3.1.2"
13+
"version": "TESTING"
1414
}
1515
]
1616
},

tests/fixtures/json/1.2/bom_issue_275_components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"vendor": "CycloneDX",
1212
"name": "cyclonedx-python-lib",
13-
"version": "3.1.2"
13+
"version": "TESTING"
1414
}
1515
],
1616
"component": {

tests/fixtures/json/1.2/bom_issue_328_components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"vendor": "CycloneDX",
1212
"name": "cyclonedx-python-lib",
13-
"version": "3.1.2"
13+
"version": "TESTING"
1414
}
1515
],
1616
"component": {

tests/fixtures/json/1.2/bom_services_complex.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"vendor": "CycloneDX",
1212
"name": "cyclonedx-python-lib",
13-
"version": "3.1.2"
13+
"version": "TESTING"
1414
}
1515
],
1616
"component": {

tests/fixtures/json/1.2/bom_services_nested.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"vendor": "CycloneDX",
1212
"name": "cyclonedx-python-lib",
13-
"version": "3.1.2"
13+
"version": "TESTING"
1414
}
1515
],
1616
"component": {

tests/fixtures/json/1.2/bom_services_simple.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"vendor": "CycloneDX",
1212
"name": "cyclonedx-python-lib",
13-
"version": "3.1.2"
13+
"version": "TESTING"
1414
}
1515
],
1616
"component": {

tests/fixtures/json/1.2/bom_setuptools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"vendor": "CycloneDX",
1212
"name": "cyclonedx-python-lib",
13-
"version": "3.1.2"
13+
"version": "TESTING"
1414
}
1515
]
1616
},

0 commit comments

Comments
 (0)