Module ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore ListLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str keyword Str keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Str keyword Str keyword NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str keyword Str keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr BinOpSub NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str keyword Str keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr BinOpSub NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad Call NameLoad keyword NameLoad keyword NameLoad attr Expr Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str With Call NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str With Call NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list decorator_list
N/A mock patch corehq.apps.locations.models Location SQLLocation casexml.apps.case.tests.util check_user_has_case casexml.apps.case.mock CaseBlock corehq.apps.commtrack.tests.util CommTrackTest make_loc FIXED_USER corehq.toggles MULTIPLE_LOCATIONS_PER_USER NAMESPACE_DOMAIN corehq.form_processor.interfaces.supply SupplyInterface corehq.form_processor.tests.utils run_with_all_backends LocationsTest N/A CommTrackTest N/A N/A user_definitions N/A FIXED_USER setUp N/A N/A self N/A N/A N/A N/A N/A N/A super LocationsTest self setUp N/A N/A self accessor N/A SupplyInterface N/A N/A self domain name N/A N/A self user N/A N/A self users N/A 0 N/A test_sync N/A N/A self N/A N/A N/A test_state N/A make_loc teststate type state parent N/A N/A self user location N/A test_village N/A make_loc testvillage type village parent test_state N/A N/A N/A sql_village N/A N/A N/A SQLLocation objects get name testvillage domain N/A N/A self domain name N/A N/A N/A self assertEqual N/A sql_village name N/A test_village name N/A N/A N/A self assertEqual N/A sql_village domain N/A test_village domain N/A N/A N/A N/A SQLLocation DoesNotExist N/A N/A N/A N/A self fail Synced SQL object does not exist N/A run_with_all_backends test_archive N/A N/A self N/A N/A N/A test_state N/A make_loc teststate type state parent N/A N/A self user location N/A N/A N/A test_state save N/A original_count N/A len N/A list N/A N/A Location by_domain N/A N/A self domain name N/A loc N/A N/A self user location N/A N/A N/A loc archive N/A N/A N/A self assertEqual N/A len N/A list N/A N/A Location by_domain N/A N/A self domain name N/A original_count 2 N/A N/A N/A self assertEqual N/A len N/A N/A Location root_locations N/A N/A self domain name 0 N/A N/A N/A loc unarchive N/A N/A N/A self assertEqual N/A len N/A list N/A N/A Location by_domain N/A N/A self domain name original_count N/A N/A N/A self assertEqual N/A len N/A N/A Location root_locations N/A N/A self domain name 1 N/A run_with_all_backends test_archive_flips_sp_cases N/A N/A self N/A N/A N/A loc N/A make_loc someloc N/A sp N/A N/A loc linked_supply_point N/A N/A N/A self assertFalse N/A sp closed N/A N/A N/A loc archive N/A sp N/A N/A loc linked_supply_point N/A N/A N/A self assertTrue N/A sp closed N/A N/A N/A loc unarchive N/A sp N/A N/A loc linked_supply_point N/A N/A N/A self assertFalse N/A sp closed N/A run_with_all_backends test_full_delete N/A N/A self N/A N/A N/A test_loc N/A make_loc test_loc type state parent N/A N/A self user location N/A N/A N/A test_loc save N/A original_count N/A len N/A list N/A N/A Location by_domain N/A N/A self domain name N/A loc N/A N/A self user location N/A N/A N/A loc full_delete N/A N/A N/A self assertEqual N/A len N/A list N/A N/A Location by_domain N/A N/A self domain name N/A original_count 2 N/A N/A N/A self assertEqual N/A len N/A N/A Location root_locations N/A N/A self domain name 0 N/A N/A N/A self assertEqual N/A len N/A N/A N/A SQLLocation objects all 0 N/A run_with_all_backends test_delete_closes_sp_cases N/A N/A self N/A N/A N/A loc N/A make_loc test_loc N/A sp N/A N/A loc linked_supply_point N/A N/A N/A self assertFalse N/A sp closed N/A N/A N/A loc full_delete N/A sp N/A N/A N/A self accessor get_supply_point N/A sp case_id N/A N/A N/A self assertTrue N/A sp closed N/A run_with_all_backends N/A MultiLocationsTest N/A CommTrackTest N/A N/A 
    LEGACY TESTS FOR MULTI LOCATION FUNCTIONALITY

    These tests cover special functionality, generic location
    test additions should not be added to this class.
     N/A user_definitions N/A FIXED_USER setUp N/A N/A self N/A N/A N/A N/A N/A N/A super MultiLocationsTest self setUp N/A N/A self user N/A N/A self users N/A 0 N/A N/A N/A MULTIPLE_LOCATIONS_PER_USER set N/A N/A self user domain True NAMESPACE_DOMAIN N/A N/A N/A N/A self user add_location_delegate N/A N/A self user location N/A check_supply_point N/A N/A self user sp should_have N/A True N/A N/A caseblock N/A N/A N/A CaseBlock create False case_id sp as_xml N/A N/A check_user_has_case self N/A N/A user to_casexml_user caseblock line_by_line False should_have should_have N/A test_default_location_settings N/A N/A self N/A N/A N/A user N/A self user N/A N/A N/A self assertEqual N/A len N/A user locations 1 N/A N/A N/A self assertEqual N/A N/A N/A user locations N/A 0 name loc1 N/A N/A N/A self check_supply_point user N/A N/A self sp case_id N/A test_commtrack_user_has_multiple_locations N/A N/A self N/A N/A N/A user N/A self user N/A loc N/A make_loc secondloc N/A sp N/A N/A loc linked_supply_point N/A N/A N/A user add_location_delegate loc N/A N/A N/A self check_supply_point user N/A sp case_id N/A N/A N/A self assertTrue N/A len N/A user locations 2 N/A N/A N/A self assertEqual N/A N/A N/A user locations N/A 1 name secondloc N/A test_locations_can_be_removed N/A N/A self N/A N/A N/A user N/A self user N/A loc N/A make_loc secondloc N/A sp N/A N/A loc linked_supply_point N/A N/A N/A user add_location_delegate loc N/A N/A N/A self check_supply_point user N/A sp case_id N/A N/A N/A user remove_location_delegate loc N/A N/A N/A self check_supply_point user N/A sp case_id False N/A N/A N/A self assertEqual N/A len N/A user locations 1 N/A test_location_removal_only_submits_if_it_existed N/A N/A self N/A N/A N/A user N/A self user N/A loc N/A make_loc secondloc N/A N/A patch corehq.apps.users.models.CommCareUser.submit_location_block submit_blocks N/A N/A N/A N/A user remove_location_delegate loc N/A N/A N/A self assertEqual N/A submit_blocks call_count 0 N/A test_can_clear_locations N/A N/A self N/A N/A N/A user N/A self user N/A N/A N/A user clear_location_delegates N/A N/A N/A self assertEqual N/A len N/A user locations 0 N/A test_can_set_locations N/A N/A self N/A N/A N/A user N/A self user N/A loc1 N/A make_loc secondloc N/A sp1 N/A N/A loc1 linked_supply_point N/A loc2 N/A make_loc thirdloc N/A sp2 N/A N/A loc2 linked_supply_point N/A N/A N/A user create_location_delegates N/A loc1 loc2 N/A N/A N/A self assertEqual N/A len N/A user locations 2 N/A N/A N/A self check_supply_point user N/A sp1 case_id N/A N/A N/A self check_supply_point user N/A sp2 case_id N/A test_setting_new_list_causes_submit N/A N/A self N/A N/A N/A 
        this test mostly exists to make sure the one
        testing no submits doesn't silently stop actually working
         N/A user N/A self user N/A loc1 N/A make_loc secondloc N/A N/A patch corehq.apps.users.models.CommCareUser.submit_location_block submit_blocks N/A N/A N/A N/A user create_location_delegates N/A loc1 N/A N/A N/A self assertEqual N/A submit_blocks call_count 1 N/A test_setting_existing_list_does_not_submit N/A N/A self N/A N/A N/A user N/A self user N/A N/A N/A user clear_location_delegates N/A loc1 N/A make_loc secondloc N/A loc2 N/A make_loc thirdloc N/A N/A N/A user add_location_delegate loc1 N/A N/A N/A user add_location_delegate loc2 N/A N/A patch corehq.apps.users.models.CommCareUser.submit_location_block submit_blocks N/A N/A N/A N/A user create_location_delegates N/A loc1 loc2 N/A N/A N/A self assertEqual N/A submit_blocks call_count 0 N/A N/A