From 2e5b875b7f31a4105029974ad0ca29399bb80b72 Mon Sep 17 00:00:00 2001 From: bjmb Date: Wed, 5 Apr 2017 14:29:56 -0400 Subject: [PATCH] Clarified some parts of the code in the tests --- tests/integration/cqlengine/query/test_updates.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/cqlengine/query/test_updates.py b/tests/integration/cqlengine/query/test_updates.py index d214336a..3410e252 100644 --- a/tests/integration/cqlengine/query/test_updates.py +++ b/tests/integration/cqlengine/query/test_updates.py @@ -313,11 +313,12 @@ class QueryUpdateTests(BaseCassEngTestCase): obj = TestQueryUpdateModel.objects( partition=partition, cluster=cluster).first() - self.assertFalse(any([obj._values[column].deleted for column in obj._values])) + self.assertFalse({k: v for (k, v) in obj._values.items() if v.deleted}) obj.text = 'foo' obj.save() - + #execute_count will check the execution count and + #assert no more calls than necessary where made class StaticDeleteModel(Model): example_id = columns.Integer(partition_key=True, primary_key=True, default=uuid4)