From 36c0f3c083ab812dde2197a056b7f0333fd57594 Mon Sep 17 00:00:00 2001 From: Alex Proskuriakov Date: Sat, 9 Dec 2023 22:08:38 +0300 Subject: [PATCH] Refactored some tests utils --- tests/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index e17c1cc..171ed2d 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -17,7 +17,7 @@ def compare(left, right) -> None: def clean(item) -> dict: wanted = '_sa_instance_state' d = vars(item).copy() - if hasattr(d, wanted): + if wanted in d: d.pop(wanted) return d