

def test_boundary_date(self):
    rules = AutomaticUpdateRule.by_domain(self.domain)
    rules_by_case_type = AutomaticUpdateRule.organize_rules_by_case_type(rules_by_case_type)
    boundary_date = AutomaticUpdateRule.get_boundary_date(rules_by_case_type['test-case-type'], datetime(2016, 1, 1))
    self.assertEqual(boundary_date, datetime(2015, 12, 2))
    boundary_date = AutomaticUpdateRule.get_boundary_date(rules_by_case_type['test-case-type-2'], datetime(2016, 1, 1))
    self.assertEqual(boundary_date, datetime(2015, 12, 2))

dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/data_interfaces/tests/test_auto_case_updates.py AutomaticCaseUpdateTest.test_boundary_date/VarMisuse@27/47 `rules`->`rules_by_case_type`