def test_sibling_specializations_with_same_attributes(self):
        generalized_route = Route(
            FAKE_VIEW,
            FAKE_ROUTE_NAME,
            FAKE_SUB_ROUTES,
            )

        specialized_route_1 = generalized_route.create_specialization()
        specialized_route_2 = generalized_route.create_specialization()

        assert_equivalent(specialized_route_1, specialized_route_2)
    def test_specializations_from_equivalent_generalizations(self):
        generalized_route_1 = Route(
            None,
            FAKE_ROUTE_NAME,
            FAKE_SUB_ROUTES,
            )
        specialized_route_1 = generalized_route_1.create_specialization()

        generalized_route_2 = Route(
            None,
            FAKE_ROUTE_NAME,
            FAKE_SUB_ROUTES,
            )
        specialized_route_2 = generalized_route_2.create_specialization()

        assert_equivalent(specialized_route_1, specialized_route_2)
    def test_sibling_specializations_with_same_sub_routes(self):
        generalized_sub_route = Route(None, None, FAKE_SUB_ROUTES)
        generalized_route = Route(
            FAKE_VIEW,
            FAKE_ROUTE_NAME,
            [generalized_sub_route],
            )

        specialized_sub_route_1 = generalized_sub_route.create_specialization()
        specialized_route_1 = generalized_route.create_specialization(
            specialized_sub_routes=[specialized_sub_route_1],
            )

        specialized_sub_route_2 = generalized_sub_route.create_specialization()
        specialized_route_2 = generalized_route.create_specialization(
            specialized_sub_routes=[specialized_sub_route_2],
            )

        assert_equivalent(specialized_route_1, specialized_route_2)
Beispiel #4
0
    def test_routes_with_same_attributes(self):
        route_1 = Route(FAKE_VIEW, FAKE_ROUTE_NAME, FAKE_SUB_ROUTES)
        route_2 = Route(FAKE_VIEW, FAKE_ROUTE_NAME, FAKE_SUB_ROUTES)

        assert_equivalent(route_1, route_2)