From f1ba12e714a0d15c5979bf2253ecf451c0363353 Mon Sep 17 00:00:00 2001 From: Ken Auberry Date: Thu, 22 Apr 2021 01:27:03 -0700 Subject: [PATCH 1/2] One minor change to make the object hash generator pull the correct set of data (that ignores deleted records) --- pacifica/metadata/orm/base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pacifica/metadata/orm/base.py b/pacifica/metadata/orm/base.py index 1913e5d8..2d593182 100644 --- a/pacifica/metadata/orm/base.py +++ b/pacifica/metadata/orm/base.py @@ -257,7 +257,6 @@ def available_hash_list(cls, columns_and_where_clause=None): for any object in the database. """ where_clause = {k: v for k, v in columns_and_where_clause.items() if v} - where_clause['deleted'] = None columns = list(columns_and_where_clause.keys()) From a2826058882a477386f81ac60e81efe047db2f28 Mon Sep 17 00:00:00 2001 From: Ken Auberry Date: Thu, 22 Apr 2021 01:49:43 -0700 Subject: [PATCH 2/2] Minor fixes for the pylint gods --- pylintrc | 3 +++ tests/core/client_test.py | 2 +- tests/core/cmd_test.py | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pylintrc b/pylintrc index 014736c0..3c13c2de 100644 --- a/pylintrc +++ b/pylintrc @@ -2,3 +2,6 @@ min-similarity-lines=8 ignore-imports=yes max-line-length=120 + +[MESSAGES CONTROL] +disable=super-with-arguments, raise-missing-from diff --git a/tests/core/client_test.py b/tests/core/client_test.py index 6e73e821..275566e8 100644 --- a/tests/core/client_test.py +++ b/tests/core/client_test.py @@ -303,4 +303,4 @@ def test_client_update_unk_error(self): client.update(class_type, params, post_body) except PMClientError as ex: self.assertTrue('301' in str(ex)) - self.assertTrue('This is the error.'in str(ex)) + self.assertTrue('This is the error.' in str(ex)) diff --git a/tests/core/cmd_test.py b/tests/core/cmd_test.py index 6f7bcc8e..4f213a70 100644 --- a/tests/core/cmd_test.py +++ b/tests/core/cmd_test.py @@ -60,6 +60,8 @@ def requests_retry_session(retries=3, backoff_factor=0.5, status_forcelist=(500, # The complication here is that older versions of the metadata service can't install # in Python versions > 3.7. The psycopg2 package required for those older versions # do not compile against Python > 3.7. + + @pytest.mark.skipif(sys.version_info > (3, 8), reason='requires python3.7 or less') class AdminCmdBase: """Test base class for setting up update environments."""