

@run_with_all_backends
def test_date_case_properties_for_equality(self):
    "\n        Date case properties are automatically converted from string to date\n        when fetching from the db, so here we want to make sure this doesn't\n        interfere with our ability to compare dates for equality.\n        "
    with _with_case(self.domain, 'test-case-type-2', datetime(2015, 1, 1)) as case:
        case.rule2.automaticupdaterulecriteria_set = [AutomaticUpdateRuleCriteria(property_name='property1', property_value='2016-02-24', match_type=AutomaticUpdateRuleCriteria.MATCH_EQUAL)]
        set_case_property_directly(case, 'property1', '2016-02-24')
        self.assertTrue(self.rule2.rule_matches_case(case, datetime(2016, 1, 1)))
        set_case_property_directly(case, 'property1', '2016-02-25')
        self.assertFalse(self.rule2.rule_matches_case(case, datetime(2016, 1, 1)))

dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/data_interfaces/tests/test_auto_case_updates.py AutomaticCaseUpdateTest.test_date_case_properties_for_equality/VarMisuse@38/139 `self`->`case`