Module Expr Str Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad Str For NameStore Call NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Call AttributeLoad Str attr NameLoad keyword NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad 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 keyword Str keyword Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Str comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Str comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assert CompareEq NameLoad Set AttributeLoad NameLoad attr Assert CompareEq NameLoad Set AttributeLoad NameLoad 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 seed/views/labels.py
 django.test TestCase django.core.urlresolvers reverse rest_framework.test APIClient rest_framework status seed.utils.organizations create_organization seed.models StatusLabel Label seed.landing.models SEEDUser User TestLabelsViewSet N/A TestCase N/A N/A Test the label DRF viewset test_results_are_not_actually_paginated N/A N/A self N/A N/A N/A 
        Ensure that labels are not actually paginated.
         N/A user N/A N/A N/A User objects create_superuser email test_user@demo.com username test_user@demo.com password secret N/A N/A organization _ _ N/A create_organization user test-organization N/A i N/A range 101 N/A N/A N/A N/A N/A Label objects create color red name N/A N/A test_label-{0} format i super_organization organization N/A client N/A APIClient N/A N/A N/A client login username N/A user username password secret N/A url N/A reverse labels:label-list N/A response N/A N/A client get url N/A N/A N/A self assertEqual N/A response status_code N/A status HTTP_200_OK N/A N/A N/A self assertEqual N/A N/A response data N/A count N/A N/A N/A organization labels count N/A results N/A N/A response data N/A results N/A N/A N/A self assertEqual N/A len results N/A N/A N/A organization labels count N/A test_organization_query_param_is_used N/A N/A self N/A N/A N/A 
        Ensure that when the organization_id query parameter is provided, that
        the endpoint returns the appropriate labels for that organization.
         N/A user N/A N/A N/A User objects create_superuser email test_user@demo.com username test_user@demo.com password secret N/A N/A organization_a _ _ N/A create_organization user test-organization-a N/A N/A organization_b _ _ N/A create_organization user test-organization-b N/A N/A N/A N/A Label objects create color red name test_label-a super_organization organization_a N/A N/A N/A N/A Label objects create color red name test_label-b super_organization organization_b N/A client N/A APIClient N/A N/A N/A client login username N/A user username password secret N/A url N/A reverse labels:label-list N/A response_a N/A N/A client get url N/A organization_id N/A organization_a pk N/A response_b N/A N/A client get url N/A organization_id N/A organization_b pk N/A N/A N/A self assertEqual N/A response_a status_code N/A status HTTP_200_OK N/A N/A N/A self assertEqual N/A response_b status_code N/A status HTTP_200_OK N/A results_a N/A set N/A N/A result N/A organization_id N/A result N/A N/A response_a data N/A results N/A results_b N/A set N/A N/A result N/A organization_id N/A result N/A N/A response_b data N/A results N/A N/A results_a N/A N/A organization_a pk N/A N/A results_b N/A N/A organization_b pk N/A N/A