Module TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ClassDef bases NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr Str With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Str attr Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Str attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str With Call AttributeLoad NameLoad attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr Str Assign NameStore AttributeLoad NameLoad attr With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr keyword Str attr keyword Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr keyword Str With Call AttributeLoad NameLoad attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Assign NameStore AttributeLoad NameLoad attr With Call NameLoad NameStore body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr keyword Num attr keyword Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr keyword Num attr keyword Str With Call AttributeLoad NameLoad attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str NameLoad Num NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr keyword Num attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr keyword Num attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr keyword Num attr Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr keyword Num attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr keyword Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr keyword Num attr keyword Str Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr keyword Num attr keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr attr Str Expr Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr keyword Num attr keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr keyword Num attr keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr attr decorator_list decorator_list Call AttributeLoad NameLoad attr CompareGtE NameLoad Str Str
N/A N/A N/A N/A unittest2 unittest N/A N/A N/A ImportError N/A N/A unittest N/A mock N/A six uuid uuid4 cassandra.cqlengine columns cassandra.cqlengine.management sync_table drop_table cassandra.cqlengine.models Model cassandra.cqlengine.query BatchQuery LWTException cassandra.cqlengine.statements ConditionalClause tests.integration.cqlengine.base BaseCassEngTestCase tests.integration CASSANDRA_VERSION greaterthancass20 TestConditionalModel N/A Model N/A N/A id N/A N/A columns UUID primary_key True default uuid4 N/A count N/A N/A columns Integer N/A text N/A N/A columns Text required False N/A TestConditional N/A BaseCassEngTestCase N/A setUpClass N/A N/A cls N/A N/A N/A N/A N/A N/A super TestConditional cls setUpClass N/A N/A sync_table TestConditionalModel N/A classmethod tearDownClass N/A N/A cls N/A N/A N/A N/A N/A N/A super TestConditional cls tearDownClass N/A N/A drop_table TestConditionalModel N/A classmethod test_update_using_conditional N/A N/A self N/A N/A N/A t N/A N/A TestConditionalModel create text blah blah N/A N/A t text new blah N/A N/A N/A N/A mock patch object N/A self session execute m N/A N/A N/A N/A N/A N/A t iff text blah blah save N/A args N/A m call_args N/A N/A N/A self assertIn IF "text" = %(0)s N/A N/A N/A args N/A 0 N/A 0 query_string N/A test_update_conditional_success N/A N/A self N/A N/A N/A t N/A N/A TestConditionalModel create text blah blah count 5 N/A id N/A t id N/A N/A t text new blah N/A N/A N/A N/A N/A t iff text blah blah save N/A updated N/A N/A N/A N/A TestConditionalModel objects id id first N/A N/A N/A self assertEqual N/A updated count 5 N/A N/A N/A self assertEqual N/A updated text new blah N/A test_update_failure N/A N/A self N/A N/A N/A t N/A N/A TestConditionalModel create text blah blah N/A N/A t text new blah N/A t N/A N/A t iff text something wrong N/A N/A N/A self assertRaises LWTException assertion N/A N/A N/A N/A t save N/A N/A N/A self assertEqual N/A N/A assertion exception existing N/A text [applied] blah blah False N/A test_blind_update N/A N/A self N/A N/A N/A t N/A N/A TestConditionalModel create text blah blah N/A N/A t text something else N/A uid N/A t id N/A N/A N/A N/A mock patch object N/A self session execute m N/A N/A N/A N/A N/A N/A N/A N/A TestConditionalModel objects id uid iff text blah blah update text oh hey der N/A args N/A m call_args N/A N/A N/A self assertIn IF "text" = %(1)s N/A N/A N/A args N/A 0 N/A 0 query_string N/A test_blind_update_fail N/A N/A self N/A N/A N/A t N/A N/A TestConditionalModel create text blah blah N/A N/A t text something else N/A uid N/A t id N/A qs N/A N/A N/A N/A TestConditionalModel objects id uid iff text Not dis! N/A N/A N/A self assertRaises LWTException assertion N/A N/A N/A N/A qs update text this will never work N/A N/A N/A self assertEqual N/A N/A assertion exception existing N/A text [applied] blah blah False N/A test_conditional_clause N/A N/A self N/A N/A N/A tc N/A ConditionalClause some_value 23 N/A N/A N/A tc set_context_id 3 N/A N/A N/A self assertEqual "some_value" = %(3)s N/A N/A six text_type tc N/A N/A N/A self assertEqual "some_value" = %(3)s N/A str tc N/A test_batch_update_conditional N/A N/A self N/A N/A N/A t N/A N/A TestConditionalModel create text something count 5 N/A id N/A t id N/A N/A BatchQuery b N/A N/A N/A N/A N/A N/A N/A N/A t batch b iff count 5 update text something else N/A updated N/A N/A N/A N/A TestConditionalModel objects id id first N/A N/A N/A self assertEqual N/A updated text something else N/A b N/A BatchQuery N/A N/A N/A N/A N/A N/A N/A updated batch b iff count 6 update text and another thing N/A N/A N/A self assertRaises LWTException assertion N/A N/A N/A N/A b execute N/A N/A N/A self assertEqual N/A N/A assertion exception existing N/A id count [applied] id 5 False N/A updated N/A N/A N/A N/A TestConditionalModel objects id id first N/A N/A N/A self assertEqual N/A updated text something else N/A test_delete_conditional N/A N/A self N/A N/A N/A t N/A N/A TestConditionalModel create text something count 5 N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 1 N/A N/A N/A self assertRaises LWTException N/A N/A N/A N/A N/A N/A t iff count 9999 delete N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 1 N/A N/A N/A N/A N/A t iff count 5 delete N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 0 N/A t N/A N/A TestConditionalModel create text something count 5 N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 1 N/A N/A N/A self assertRaises LWTException N/A N/A N/A N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id iff count 9999 delete N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 1 N/A N/A N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id iff count 5 delete N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 0 N/A test_delete_lwt_ne N/A N/A self N/A N/A N/A 
        Test to ensure that deletes using IF and not equals are honored correctly

        @since 3.2
        @jira_ticket PYTHON-328
        @expected_result Delete conditional with NE should be honored

        @test_category object_mapper
         N/A t N/A N/A TestConditionalModel create text something count 5 N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 1 N/A N/A N/A self assertRaises LWTException N/A N/A N/A N/A N/A N/A t iff count__ne 5 delete N/A N/A N/A N/A N/A t iff count__ne 2 delete N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 0 N/A t N/A N/A TestConditionalModel create text something count 5 N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 1 N/A N/A N/A self assertRaises LWTException N/A N/A N/A N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id iff count__ne 5 delete N/A N/A N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id iff count__ne 2 delete N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 0 N/A greaterthancass20 test_update_lwt_ne N/A N/A self N/A N/A N/A 
        Test to ensure that update using IF and not equals are honored correctly

        @since 3.2
        @jira_ticket PYTHON-328
        @expected_result update conditional with NE should be honored

        @test_category object_mapper
         N/A t N/A N/A TestConditionalModel create text something count 5 N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 1 N/A N/A N/A self assertRaises LWTException N/A N/A N/A N/A N/A N/A t iff count__ne 5 update text nothing N/A N/A N/A N/A N/A t iff count__ne 2 update text nothing N/A N/A N/A self assertEqual N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id first text nothing N/A N/A N/A t delete N/A t N/A N/A TestConditionalModel create text something count 5 N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 1 N/A N/A N/A self assertRaises LWTException N/A N/A N/A N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id iff count__ne 5 update text nothing N/A N/A N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id iff count__ne 2 update text nothing N/A N/A N/A self assertEqual N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id first text nothing N/A N/A N/A t delete N/A greaterthancass20 test_update_to_none N/A N/A self N/A N/A N/A t N/A N/A TestConditionalModel create text something count 5 N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 1 N/A N/A N/A self assertRaises LWTException N/A N/A N/A N/A N/A N/A t iff count 9999 update text None N/A N/A N/A self assertIsNotNone N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id first text N/A N/A N/A N/A N/A t iff count 5 update text None N/A N/A N/A self assertIsNone N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id first text N/A t N/A N/A TestConditionalModel create text something count 5 N/A N/A N/A self assertEqual N/A N/A N/A N/A TestConditionalModel objects id N/A t id count 1 N/A N/A N/A self assertRaises LWTException N/A N/A N/A N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id iff count 9999 update text None N/A N/A N/A self assertIsNotNone N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id first text N/A N/A N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id iff count 5 update text None N/A N/A N/A self assertIsNone N/A N/A N/A N/A N/A TestConditionalModel objects id N/A t id first text N/A N/A N/A N/A unittest skipUnless N/A CASSANDRA_VERSION 2.0.0 conditionals only supported on cassandra 2.0 or higher