Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad keyword ListLoad AttributeLoad NameLoad attr keyword ListLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr For NameStore Call NameLoad Num Num body Expr Call NameLoad Expr Call NameLoad Dict Str Str NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Dict Str Str NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Dict Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Str keyword Dict Str AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad Call NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Str Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Str Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr Dict Str Str Assign AttributeStore NameLoad attr Call NameLoad Str keyword Dict Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad keyword ListLoad AttributeLoad NameLoad attr keyword ListLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Dict Str Str NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore BoolOpOr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Str keyword Dict Str Str AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad keyword Str Expr Call NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad Call NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Dict Str Str AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Dict Str Str Str ListLoad Num Num Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A N/A Tests for views of contributions (locations). N/A json django.test TestCase django.core.urlresolvers reverse rest_framework.test APIRequestFactory force_authenticate geokey.projects.tests.model_factories UserFactory ProjectFactory model_factories LocationFactory geokey.contributions.views.locations LocationsAPIView SingleLocationAPIView geokey.contributions.models Location LocationApiTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self factory N/A APIRequestFactory N/A N/A self admin N/A N/A UserFactory create N/A N/A self contributor N/A N/A UserFactory create N/A N/A self non_member N/A N/A UserFactory create N/A N/A self project N/A ProjectFactory add_admins N/A N/A self admin add_contributors N/A N/A self contributor N/A N/A self other_project N/A N/A ProjectFactory create N/A x N/A range 0 5 N/A N/A N/A LocationFactory N/A N/A LocationFactory N/A private private_for_project True N/A self other_project N/A N/A LocationFactory N/A private private_for_project True N/A self project N/A N/A LocationFactory N/A private True N/A _get N/A N/A self user N/A N/A N/A url N/A reverse api:project_locations kwargs N/A project_id N/A N/A self project id N/A request N/A N/A N/A self factory get url N/A N/A force_authenticate request user user N/A view N/A N/A LocationsAPIView as_view N/A N/A N/A N/A view request project_id N/A N/A self project id render N/A test_get_locations_with_admin N/A N/A self N/A N/A N/A response N/A N/A self _get N/A self admin N/A N/A N/A self assertEquals N/A response status_code 200 N/A N/A N/A self assertEquals N/A len N/A N/A N/A N/A json loads N/A response content get features 10 N/A test_get_locations_with_contributor N/A N/A self N/A N/A N/A response N/A N/A self _get N/A self contributor N/A N/A N/A self assertEquals N/A response status_code 200 N/A N/A N/A self assertEquals N/A len N/A N/A N/A N/A json loads N/A response content get features 10 N/A test_get_locations_with_non_member N/A N/A self N/A N/A N/A response N/A N/A self _get N/A self non_member N/A N/A N/A self assertEquals N/A response status_code 404 N/A N/A LocationQueryTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self factory N/A APIRequestFactory N/A N/A self project N/A ProjectFactory N/A N/A N/A LocationFactory create N/A name Hyde Park N/A N/A N/A LocationFactory create N/A description hyde N/A N/A N/A LocationFactory create N/A name hyde park N/A N/A N/A LocationFactory create N/A name Regents Park N/A N/A self url N/A reverse api:project_locations kwargs N/A project_id N/A N/A self project id N/A test_hyd N/A N/A self N/A N/A N/A request N/A N/A N/A self factory get N/A N/A self url ?query=Hyd N/A N/A force_authenticate request user N/A N/A self project creator N/A view N/A N/A LocationsAPIView as_view N/A response N/A N/A N/A view request project_id N/A N/A self project id render N/A response_json N/A N/A json loads N/A response content N/A N/A N/A self assertEqual N/A len N/A N/A response_json get features 3 N/A N/A N/A self assertNotIn Regents Park N/A response content N/A test_park N/A N/A self N/A N/A N/A request N/A N/A N/A self factory get N/A N/A self url ?query=park N/A N/A force_authenticate request user N/A N/A self project creator N/A view N/A N/A LocationsAPIView as_view N/A response N/A N/A N/A view request project_id N/A N/A self project id render N/A response_json N/A N/A json loads N/A response content N/A N/A N/A self assertEqual N/A len N/A N/A response_json get features 3 N/A N/A N/A self assertNotIn "description": "hyde" N/A response content N/A test_regen N/A N/A self N/A N/A N/A request N/A N/A N/A self factory get N/A N/A self url ?query=regen N/A N/A force_authenticate request user N/A N/A self project creator N/A view N/A N/A LocationsAPIView as_view N/A response N/A N/A N/A view request project_id N/A N/A self project id render N/A response_json N/A N/A json loads N/A response content N/A N/A N/A self assertEqual N/A len N/A N/A response_json get features 1 N/A N/A N/A self assertNotIn hyde N/A response content N/A N/A N/A self assertNotIn Hyde Park N/A response content N/A N/A LocationUpdateApiTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self factory N/A APIRequestFactory N/A N/A self admin N/A N/A UserFactory create N/A N/A self contributor N/A N/A UserFactory create N/A N/A self view_member N/A N/A UserFactory create N/A N/A self non_member N/A N/A UserFactory create N/A N/A self project N/A ProjectFactory add_admins N/A N/A self admin add_contributors N/A N/A self contributor N/A N/A self location N/A LocationFactory N/A private private_for_project True N/A self project N/A patch N/A N/A self data user location_id N/A None N/A N/A l_id N/A location_id N/A N/A self location id N/A url N/A reverse api:project_single_location kwargs N/A project_id location_id N/A N/A self project id l_id N/A request N/A N/A N/A self factory patch url N/A N/A json dumps data content_type application/json N/A N/A force_authenticate request user user N/A view N/A N/A SingleLocationAPIView as_view N/A N/A N/A N/A view request project_id N/A N/A self project id location_id l_id render N/A test_update_location_with_wrong_status N/A N/A self N/A N/A N/A response N/A N/A self patch N/A status Bla N/A self admin N/A N/A N/A self assertEqual N/A response status_code 400 N/A location N/A N/A N/A Location objects get pk N/A N/A self location id N/A N/A N/A self assertEqual N/A location status N/A N/A self location status N/A test_update_not_existing_location N/A N/A self N/A N/A N/A response N/A N/A self patch N/A properties N/A name UCL N/A self admin location_id 10000000000000000000000 N/A N/A N/A self assertEqual N/A response status_code 404 N/A test_update_private_location N/A N/A self N/A N/A N/A private N/A LocationFactory N/A private True N/A response N/A N/A self patch N/A name UCL N/A self admin location_id N/A private id N/A N/A N/A self assertEqual N/A response status_code 403 N/A location N/A N/A N/A Location objects get pk N/A private id N/A N/A N/A self assertEqual N/A location name N/A private name N/A test_update_location_with_admin N/A N/A self N/A N/A N/A response N/A N/A self patch N/A geometry name N/A type coordinates Point N/A -0.140612125397 51.5017638573 UCL N/A self admin N/A N/A N/A self assertEqual N/A response status_code 200 N/A location N/A N/A N/A Location objects get pk N/A N/A self location id N/A N/A N/A self assertEqual N/A location name UCL N/A test_update_location_with_contributor N/A N/A self N/A N/A N/A response N/A N/A self patch N/A description main quad N/A self contributor N/A N/A N/A self assertEqual N/A response status_code 200 N/A location N/A N/A N/A Location objects get pk N/A N/A self location id N/A N/A N/A self assertEqual N/A location description main quad N/A test_update_location_with_non_member N/A N/A self N/A N/A N/A response N/A N/A self patch N/A description UCL N/A self non_member N/A N/A N/A self assertEqual N/A response status_code 404 N/A location N/A N/A N/A Location objects get pk N/A N/A self location id N/A N/A N/A self assertEqual N/A location description N/A N/A self location description N/A N/A