From 96d21dfbee308cd8fe00809184f78da9231ece4a Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Wed, 18 Nov 2020 11:11:58 -0500 Subject: test_persistence: simplify VersionIsPoppedFromState (#674) --- cloudinit/tests/test_persistence.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cloudinit') diff --git a/cloudinit/tests/test_persistence.py b/cloudinit/tests/test_persistence.py index 3e5eaa8d..ec1152a9 100644 --- a/cloudinit/tests/test_persistence.py +++ b/cloudinit/tests/test_persistence.py @@ -105,8 +105,7 @@ class VersionIsPoppedFromState(CloudInitPickleMixin, metaclass=_Collector): def _unpickle(self, ci_pkl_version: int) -> None: # `self._ci_pkl_version` returns the type's _ci_pkl_version if it isn't # in instance state, so we need to explicitly check self.__dict__. - sentinel = mock.sentinel.default - assert self.__dict__.get("_ci_pkl_version", sentinel) == sentinel + assert "_ci_pkl_version" not in self.__dict__ class TestPickleMixin: -- cgit v1.2.3