@@ -0,0 +1,2613 @@
+from openfisca_core.simulations.simulation_builder import SimulationBuilder%0Afrom openfisca_core.taxbenefitsystems import TaxBenefitSystem%0Afrom openfisca_core.entities import build_entity%0A%0Adef test_shortcut_to_containing_entity_provided():%0A    %22%22%22%0A    Tests that, when an entity provides a containing entity,%0A    the shortcut to that containing entity is provided.%0A    %22%22%22%0A    person_entity = build_entity(%0A        key=%22person%22,%0A        plural=%22people%22,%0A        label=%22A person%22,%0A        is_person=True,%0A        )%0A    family_entity = build_entity(%0A        key=%22family%22,%0A        plural=%22families%22,%0A        label=%22A family (all members in the same household)%22,%0A        containing_entities=%5B%22household%22%5D,%0A        roles=%5B%7B%0A            %22key%22: %22member%22,%0A            %22plural%22: %22members%22,%0A            %22label%22: %22Member%22,%0A            %7D%5D%0A        )%0A    household_entity = build_entity(%0A        key=%22household%22,%0A        plural=%22households%22,%0A        label=%22A household, containing one or more families%22,%0A        roles=%5B%7B%0A            %22key%22: %22member%22,%0A            %22plural%22: %22members%22,%0A            %22label%22: %22Member%22,%0A            %7D%5D%0A        )%0A%0A    entities = %5Bperson_entity, family_entity, household_entity%5D%0A%0A    system = TaxBenefitSystem(entities)%0A    simulation = SimulationBuilder().build_from_dict(system, %7B%7D)%0A    assert simulation.populations%5B%22family%22%5D.household.entity.key == %22household%22%0A%0Adef test_shortcut_to_containing_entity_not_provided():%0A    %22%22%22%0A    Tests that, when an entity doesn't provide a containing %0A    entity, the shortcut to that containing entity is not provided.%0A    %22%22%22%0A    person_entity = build_entity(%0A        key=%22person%22,%0A        plural=%22people%22,%0A        label=%22A person%22,%0A        is_person=True,%0A        )%0A    family_entity = build_entity(%0A        key=%22family%22,%0A        plural=%22families%22,%0A        label=%22A family (all members in the same household)%22,%0A        containing_entities=%5B%5D,%0A        roles=%5B%7B%0A            %22key%22: %22member%22,%0A            %22plural%22: %22members%22,%0A            %22label%22: %22Member%22,%0A            %7D%5D%0A        )%0A    household_entity = build_entity(%0A        key=%22household%22,%0A        plural=%22households%22,%0A        label=%22A household, containing one or more families%22,%0A        roles=%5B%7B%0A            %22key%22: %22member%22,%0A            %22plural%22: %22members%22,%0A            %22label%22: %22Member%22,%0A            %7D%5D%0A        )%0A%0A    entities = %5Bperson_entity, family_entity, household_entity%5D%0A%0A    system = TaxBenefitSystem(entities)%0A    simulation = SimulationBuilder().build_from_dict(system, %7B%7D)%0A    try:%0A        simulation.populations%5B%22family%22%5D.household%0A        assert False%0A    except AttributeError:%0A        pass%0A    

Add unit tests for projector shortcut