Module Expr Str Expr Str ImportFrom alias ImportFrom alias identifier ImportFrom alias alias identifier alias ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call NameLoad keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad keyword NameLoad Expr Call NameLoad keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Dict Str Str Str Str Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad keyword NameLoad Expr Call NameLoad keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Dict Str Str Str Str ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad ListLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Dict Str Str Str Str ListLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A N/A 
:copyright (c) 2014 - 2016, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Department of Energy) and contributors. All rights reserved.  # NOQA
:author 'Piper Merriam <pipermerriam@gmail.com>'
 N/A 
Unit tests for map.py
 django.test TestCase seed.lib.superperms.orgs.models Organization SuperOrganization seed.models BuildingSnapshot StatusLabel Label CanonicalBuilding seed.serializers.labels LabelSerializer UpdateBuildingLabelsSerializer seed.factory SEEDFactory TestLabelSerializer N/A TestCase N/A N/A Test the label serializer test_initialization_requires_organization_as_argument N/A N/A self N/A N/A N/A N/A N/A self assertRaises KeyError N/A N/A N/A LabelSerializer building_snapshots N/A N/A N/A BuildingSnapshot objects none N/A organization N/A N/A N/A SuperOrganization objects create name test-org N/A N/A LabelSerializer super_organization organization building_snapshots N/A N/A N/A BuildingSnapshot objects none N/A test_initialization_requires_building_snapshots_as_argument N/A N/A self N/A N/A N/A organization N/A N/A N/A SuperOrganization objects create name test-org N/A N/A N/A self assertRaises KeyError N/A N/A N/A LabelSerializer super_organization organization N/A N/A LabelSerializer super_organization organization building_snapshots N/A N/A N/A BuildingSnapshot objects none N/A test_uses_provided_organization_over_post_data N/A N/A self N/A N/A N/A 
        Checks that the serializer doesn't trust a user-provided super
        organization, but rather uses the one determined by the server to
        belong to the user.
         N/A organization_a N/A N/A N/A SuperOrganization objects create name test-org-a N/A organization_b N/A N/A N/A SuperOrganization objects create name test-org-b N/A data N/A name color organization_id test-label-1 red N/A organization_a pk N/A serializer N/A LabelSerializer data data super_organization organization_b building_snapshots N/A N/A N/A BuildingSnapshot objects none N/A N/A N/A self assertTrue N/A N/A serializer is_valid N/A serializer errors N/A N/A N/A self assertEqual N/A N/A serializer validated_data N/A super_organization organization_b N/A test_computed_property_is_applied N/A N/A self N/A N/A N/A organization N/A N/A N/A SuperOrganization objects create name test-org N/A label_a N/A N/A N/A Label objects create color red name test_label-a super_organization organization N/A label_b N/A N/A N/A Label objects create color red name test_label-b super_organization organization N/A bs N/A N/A SEEDFactory building_snapshot canonical_building N/A N/A N/A CanonicalBuilding objects create N/A N/A N/A N/A N/A bs canonical_building labels add label_a N/A qs N/A N/A N/A BuildingSnapshot objects all N/A serializer N/A LabelSerializer label_a super_organization organization building_snapshots qs N/A N/A N/A self assertTrue N/A N/A serializer data N/A is_applied N/A serializer N/A LabelSerializer label_b super_organization organization building_snapshots qs N/A N/A N/A self assertFalse N/A N/A serializer data N/A is_applied N/A N/A TestUpdateBuildingLabelsSerializer N/A TestCase N/A test_initialization_requires_organization_as_argument N/A N/A self N/A N/A N/A N/A N/A self assertRaises KeyError N/A N/A N/A UpdateBuildingLabelsSerializer queryset N/A N/A N/A CanonicalBuilding objects none N/A organization N/A N/A N/A SuperOrganization objects create name test-org N/A N/A UpdateBuildingLabelsSerializer queryset N/A N/A N/A CanonicalBuilding objects none super_organization organization N/A test_initialization_requires_queryset_as_argument N/A N/A self N/A N/A N/A organization N/A N/A N/A SuperOrganization objects create name test-org N/A N/A N/A self assertRaises KeyError N/A N/A N/A UpdateBuildingLabelsSerializer super_organization organization N/A N/A UpdateBuildingLabelsSerializer super_organization organization queryset N/A N/A N/A CanonicalBuilding objects none N/A test_labels_are_applied N/A N/A self N/A N/A N/A organization N/A N/A N/A SuperOrganization objects create name test-org N/A label_a N/A N/A N/A Label objects create color red name label-a super_organization organization N/A label_b N/A N/A N/A Label objects create color red name label-b super_organization organization N/A bs_1 N/A N/A SEEDFactory building_snapshot canonical_building N/A N/A N/A CanonicalBuilding objects create N/A bs_2 N/A N/A SEEDFactory building_snapshot canonical_building N/A N/A N/A CanonicalBuilding objects create N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A N/A bs_1 canonical_building labels filter pk N/A label_a pk exists N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A N/A bs_1 canonical_building labels filter pk N/A label_b pk exists N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A N/A bs_2 canonical_building labels filter pk N/A label_a pk exists N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A N/A bs_2 canonical_building labels filter pk N/A label_b pk exists N/A qs N/A N/A N/A CanonicalBuilding objects all N/A N/A N/A self assertEqual N/A N/A qs count 2 N/A data N/A add_label_ids remove_label_ids selected_buildings select_all_checkbox N/A N/A label_a pk N/A label_b pk N/A N/A True N/A serializer N/A UpdateBuildingLabelsSerializer data data super_organization organization queryset qs N/A N/A N/A self assertTrue N/A N/A serializer is_valid N/A serializer errors N/A N/A N/A serializer save N/A N/A N/A self assertEqual N/A N/A qs count 2 N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A N/A bs_1 canonical_building labels filter pk N/A label_a pk exists N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A N/A bs_1 canonical_building labels filter pk N/A label_b pk exists N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A N/A bs_2 canonical_building labels filter pk N/A label_a pk exists N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A N/A bs_2 canonical_building labels filter pk N/A label_b pk exists N/A test_labels_are_removed N/A N/A self N/A N/A N/A organization N/A N/A N/A SuperOrganization objects create name test-org N/A label_a N/A N/A N/A Label objects create color red name label-a super_organization organization N/A label_b N/A N/A N/A Label objects create color red name label-b super_organization organization N/A bs_1 N/A N/A SEEDFactory building_snapshot canonical_building N/A N/A N/A CanonicalBuilding objects create N/A bs_2 N/A N/A SEEDFactory building_snapshot canonical_building N/A N/A N/A CanonicalBuilding objects create N/A N/A N/A N/A N/A bs_1 canonical_building labels add label_a label_b N/A N/A N/A N/A N/A bs_2 canonical_building labels add label_b N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A N/A bs_1 canonical_building labels filter pk N/A label_a pk exists N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A N/A bs_1 canonical_building labels filter pk N/A label_b pk exists N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A N/A bs_2 canonical_building labels filter pk N/A label_a pk exists N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A N/A bs_2 canonical_building labels filter pk N/A label_b pk exists N/A qs N/A N/A N/A CanonicalBuilding objects all N/A N/A N/A self assertEqual N/A N/A qs count 2 N/A data N/A add_label_ids remove_label_ids selected_buildings select_all_checkbox N/A N/A N/A label_a pk N/A label_b pk N/A True N/A serializer N/A UpdateBuildingLabelsSerializer data data super_organization organization queryset qs N/A N/A N/A self assertTrue N/A N/A serializer is_valid N/A serializer errors N/A N/A N/A serializer save N/A N/A N/A self assertEqual N/A N/A qs count 2 N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A N/A bs_1 canonical_building labels filter pk N/A label_a pk exists N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A N/A bs_1 canonical_building labels filter pk N/A label_b pk exists N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A N/A bs_2 canonical_building labels filter pk N/A label_a pk exists N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A N/A bs_2 canonical_building labels filter pk N/A label_b pk exists N/A N/A