From f31dc0e2c6ea8182bf446d1c961ccfa8333072cf Mon Sep 17 00:00:00 2001 From: "John M. Horan" Date: Thu, 13 Jun 2024 10:52:59 -0700 Subject: [PATCH] Fix test data OrderedDict key order #365 Reference: https://github.com/nexB/purldb/issues/365 Signed-off-by: John M. Horan --- purldb-toolkit/tests/test_purlcli.py | 48 +++++++++++------------ purldb-toolkit/tests/test_purlcli_live.py | 24 ++++++------ 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/purldb-toolkit/tests/test_purlcli.py b/purldb-toolkit/tests/test_purlcli.py index a0fc9055..3e8650fb 100644 --- a/purldb-toolkit/tests/test_purlcli.py +++ b/purldb-toolkit/tests/test_purlcli.py @@ -67,6 +67,9 @@ def test_metadata_details(self, mock_collect_metadata): ("version", None), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -91,9 +94,6 @@ def test_metadata_details(self, mock_collect_metadata): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), OrderedDict( @@ -105,6 +105,9 @@ def test_metadata_details(self, mock_collect_metadata): ("version", "0.1.0"), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -132,9 +135,6 @@ def test_metadata_details(self, mock_collect_metadata): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), OrderedDict( @@ -146,6 +146,9 @@ def test_metadata_details(self, mock_collect_metadata): ("version", "0.2.0"), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -173,9 +176,6 @@ def test_metadata_details(self, mock_collect_metadata): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), OrderedDict( @@ -187,6 +187,9 @@ def test_metadata_details(self, mock_collect_metadata): ("version", "0.3.0"), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -214,9 +217,6 @@ def test_metadata_details(self, mock_collect_metadata): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), ] @@ -246,6 +246,9 @@ def test_metadata_details(self, mock_collect_metadata): ("version", None), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -270,9 +273,6 @@ def test_metadata_details(self, mock_collect_metadata): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), OrderedDict( @@ -284,6 +284,9 @@ def test_metadata_details(self, mock_collect_metadata): ("version", "0.1.0"), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -311,9 +314,6 @@ def test_metadata_details(self, mock_collect_metadata): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), OrderedDict( @@ -325,6 +325,9 @@ def test_metadata_details(self, mock_collect_metadata): ("version", "0.2.0"), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -352,9 +355,6 @@ def test_metadata_details(self, mock_collect_metadata): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), OrderedDict( @@ -366,6 +366,9 @@ def test_metadata_details(self, mock_collect_metadata): ("version", "0.3.0"), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -393,9 +396,6 @@ def test_metadata_details(self, mock_collect_metadata): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), ], diff --git a/purldb-toolkit/tests/test_purlcli_live.py b/purldb-toolkit/tests/test_purlcli_live.py index 53068965..c1be0410 100644 --- a/purldb-toolkit/tests/test_purlcli_live.py +++ b/purldb-toolkit/tests/test_purlcli_live.py @@ -161,6 +161,9 @@ def test_metadata_details(self): ("version", None), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -185,9 +188,6 @@ def test_metadata_details(self): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), OrderedDict( @@ -199,6 +199,9 @@ def test_metadata_details(self): ("version", "0.1.0"), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -226,9 +229,6 @@ def test_metadata_details(self): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), OrderedDict( @@ -240,6 +240,9 @@ def test_metadata_details(self): ("version", "0.2.0"), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -267,9 +270,6 @@ def test_metadata_details(self): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), OrderedDict( @@ -281,6 +281,9 @@ def test_metadata_details(self): ("version", "0.3.0"), ("qualifiers", OrderedDict()), ("subpath", None), + ("repository_homepage_url", None), + ("repository_download_url", None), + ("api_data_url", None), ("primary_language", None), ("description", None), ("release_date", None), @@ -308,9 +311,6 @@ def test_metadata_details(self): ("dependencies", []), ("contains_source_code", None), ("source_packages", []), - ("repository_homepage_url", None), - ("repository_download_url", None), - ("api_data_url", None), ] ), ],