Skip to content

Commit

Permalink
Fix failing tests #50
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Feb 23, 2024
1 parent 7dc71d7 commit e81050f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Release notes

### Version 5.1.0-dev

- Upgrade Python version to 3.12
https://github.com/nexB/dejacode/issues/50

- Replace Celery by RQ for async job queue and worker.
https://github.com/nexB/dejacode/issues/6

Expand Down
6 changes: 3 additions & 3 deletions component_catalog/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2126,7 +2126,7 @@ def test_component_model_as_cyclonedx(self):
self.component1.homepage_url = "https://homepage.url"
self.component1.notice_text = "Notice"
cyclonedx_data = self.component1.as_cyclonedx()
expected_repr = "<Component group=None, name=a, version=1.0, type=library>"
expected_repr = "<Component group=None, name=a, version=1.0, type=ComponentType.LIBRARY>"
self.assertEqual(expected_repr, repr(cyclonedx_data))
expected = {
"aboutcode:homepage_url": "https://homepage.url",
Expand All @@ -2150,8 +2150,8 @@ def test_package_model_as_cyclonedx(self):
dataspace=self.dataspace,
)
cyclonedx_data = package.as_cyclonedx()
expected_repr = "<Component group=None, name=curl, version=7.50.3-1, type=library>"
self.assertEqual(expected_repr, repr(cyclonedx_data))
expected = "<Component group=None, name=curl, version=7.50.3-1, type=ComponentType.LIBRARY>"
self.assertEqual(expected, repr(cyclonedx_data))
expected = {
"aboutcode:download_url": "https://download.url",
"aboutcode:filename": "package.zip",
Expand Down
4 changes: 2 additions & 2 deletions product_portfolio/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,8 @@ def test_product_relationship_models_as_spdx(self):
self.assertEqual(expected, pp1.as_spdx().as_dict())

def test_product_model_as_cyclonedx(self):
expected_repr = "<Component group=None, name=Product1, version=, type=application>"
self.assertEqual(expected_repr, repr(self.product1.as_cyclonedx()))
expected = "<Component group=None, name=Product1, version=, type=ComponentType.APPLICATION>"
self.assertEqual(expected, repr(self.product1.as_cyclonedx()))

def test_product_portfolio_scancode_project_model_can_start_import(self):
scancode_project = ScanCodeProject.objects.create(
Expand Down

0 comments on commit e81050f

Please sign in to comment.