Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Dict Str Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareIn Str Call AttributeLoad SubscriptLoad NameLoad Index Num attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareIn Str Call AttributeLoad SubscriptLoad NameLoad Index Num attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Dict Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Dict Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad Dict Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str Call NameLoad Str decorator_list Call NameLoad keyword Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str Call NameLoad Str decorator_list Call NameLoad keyword Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list Call NameLoad keyword Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list Call NameLoad keyword Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list Call NameLoad keyword Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad For TupleStore NameStore NameStore NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword BinOpMod Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str 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 Call NameLoad Str keyword Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpAdd NameLoad Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore ListLoad Str Str Str Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str decorator_list decorator_list
N/A N/A Tests for media.views. N/A json django.conf settings django.core.urlresolvers reverse django.test Client TestCase RequestFactory django.test.utils override_settings mock patch open_connect.media.models Image ShortenedURL open_connect.media.tests get_in_memory_image_file get_in_memory_image_instance open_connect.media.views image_view URLPopularityView AdminGalleryView open_connect.connectmessages.models MESSAGE_STATUSES open_connect.connectmessages.tests ConnectMessageTestCase open_connect.connect_core.utils.basetests ConnectTestMixin ImageViewsTest N/A ConnectTestMixin TestCase N/A N/A Tests for image_view. setUp N/A N/A self N/A N/A N/A Setup for image views tests N/A N/A N/A N/A super ImageViewsTest self setUp N/A N/A self user N/A N/A self create_superuser N/A N/A N/A N/A self client login username N/A N/A self user email password moo N/A N/A self factory N/A RequestFactory N/A N/A self request N/A N/A N/A self factory get / N/A test_image_view_increments_view_count N/A N/A self N/A N/A N/A Viewing an image should increase the view count. N/A image N/A get_in_memory_image_instance N/A self user N/A N/A image_view N/A self request N/A image uuid N/A small_image N/A N/A N/A Image objects get pk N/A image pk N/A N/A N/A self assertEqual N/A small_image view_count 1 N/A test_non_display_image_view_does_not_increment_view_count N/A N/A self N/A N/A N/A Viewing an alternate size (thumbnail) should not increment count. N/A image N/A get_in_memory_image_instance N/A self user N/A response N/A image_view N/A self request N/A image uuid image_type thumbnail N/A N/A N/A self assertEqual N/A response url N/A N/A image get_thumbnail url N/A small_image N/A N/A N/A Image objects get pk N/A image pk N/A N/A N/A self assertEqual N/A small_image view_count 0 N/A test_image_view_uses_correct_hash_key N/A N/A self mock N/A N/A N/A Viewing an alternate size (thumbnail) should not increment count. N/A N/A N/A mock get return_value None N/A image N/A get_in_memory_image_instance N/A self user N/A N/A image uuid uuid-here N/A N/A N/A image save N/A response N/A image_view N/A self request N/A image uuid image_type display_image N/A N/A N/A self assertEqual N/A response url N/A N/A image get_display_image url N/A N/A N/A N/A mock get assert_called_once_with imageurlcache_display_image_uuid-here N/A N/A N/A N/A mock set assert_called_once_with imageurlcache_display_image_uuid-here N/A N/A image get_display_image url 2700 N/A display_image N/A N/A N/A Image objects get pk N/A image pk N/A N/A N/A self assertEqual N/A display_image view_count 1 N/A N/A patch open_connect.media.views.cache test_image_view_returns_cache_if_possible N/A N/A self mock N/A N/A N/A If possible, return what's in the cache N/A N/A N/A mock get return_value http://razzmatazz.local/great.gif N/A image N/A get_in_memory_image_instance N/A self user N/A N/A image uuid uuid-here N/A N/A N/A image save N/A response N/A image_view N/A self request N/A image uuid image_type display_image N/A N/A N/A self assertEqual N/A response url http://razzmatazz.local/great.gif N/A N/A N/A N/A mock get assert_called_once_with imageurlcache_display_image_uuid-here N/A display_image N/A N/A N/A Image objects get pk N/A image pk N/A N/A N/A self assertEqual N/A display_image view_count 1 N/A N/A patch open_connect.media.views.cache test_image_view_redirects_to_image_url N/A N/A self N/A N/A N/A image_view should redirect to the actual image url. N/A image N/A get_in_memory_image_instance N/A self user N/A response N/A N/A N/A self client get N/A reverse image kwargs N/A image_uuid N/A image uuid N/A N/A N/A self assertEqual N/A N/A N/A response _headers N/A location N/A 1 N/A http://testserver%s N/A N/A image image url N/A test_upload_photos N/A N/A self N/A N/A N/A create_image should return JSON response with filelink and id. N/A response N/A N/A N/A self client post N/A reverse create_image N/A file N/A get_in_memory_image_file N/A json_response N/A N/A json loads N/A response content N/A N/A N/A self assertTrue N/A filelink N/A N/A N/A json_response N/A 0 keys N/A N/A N/A self assertTrue N/A N/A N/A N/A json_response N/A 0 N/A filelink startswith N/A settings ORIGIN N/A N/A N/A self assertTrue N/A id N/A N/A N/A json_response N/A 0 keys N/A test_upload_photos_invalid N/A N/A self N/A N/A N/A uploading an invalid value for image should return an empty list. N/A response N/A N/A N/A self client post N/A reverse create_image N/A file cookies! N/A N/A N/A self assertEqual N/A N/A json loads N/A response content N/A N/A test_upload_photos_get N/A N/A self N/A N/A N/A create_image view should return 405 when request method is GET. N/A response N/A N/A N/A self client get N/A reverse create_image N/A file cookies! N/A N/A N/A self assertEqual N/A response status_code 405 N/A test_my_images N/A N/A self N/A N/A N/A my_images should return list of images a user has uploaded. N/A image1 N/A get_in_memory_image_instance N/A self user N/A image2 N/A get_in_memory_image_instance N/A self user N/A response N/A N/A N/A self client get N/A reverse my_images N/A content N/A N/A json loads N/A response content N/A expected N/A N/A thumb image id N/A N/A image1 get_thumbnail url N/A N/A image1 get_absolute_url N/A image1 pk N/A thumb image id N/A N/A image2 get_thumbnail url N/A N/A image2 get_absolute_url N/A image2 pk N/A N/A N/A self assertEqual N/A len content N/A len expected N/A image content N/A N/A N/A N/A self assertIn image expected N/A test_promote_image_view N/A N/A self N/A N/A N/A promote image view should return json with status and uuid. N/A image N/A get_in_memory_image_instance N/A self user N/A N/A N/A self assertFalse N/A image promoted N/A response N/A N/A N/A self client post N/A reverse promote_image N/A uuid N/A image uuid N/A result N/A N/A json loads N/A response content N/A image N/A N/A N/A Image objects get pk N/A image pk N/A N/A N/A self assertTrue N/A image promoted N/A N/A N/A self assertEqual N/A result N/A status success N/A N/A N/A self assertEqual N/A result N/A uuid N/A image uuid N/A test_demote_image_view N/A N/A self N/A N/A N/A demote image view should return json with status and uuid. N/A image N/A get_in_memory_image_instance N/A self user N/A N/A image promoted True N/A N/A N/A image save N/A response N/A N/A N/A self client post N/A reverse demote_image N/A uuid N/A image uuid N/A result N/A N/A json loads N/A response content N/A image N/A N/A N/A Image objects get pk N/A image pk N/A N/A N/A self assertFalse N/A image promoted N/A N/A N/A self assertEqual N/A result N/A status success N/A N/A N/A self assertEqual N/A result N/A uuid N/A image uuid N/A test_promote_image_view_no_permission N/A N/A self N/A N/A N/A should redirect to login if user doesn't have permission. N/A user N/A N/A self create_user N/A client N/A Client N/A N/A N/A client login username N/A user email password moo N/A response N/A N/A client post N/A reverse promote_image N/A N/A N/A self assertRedirects response N/A %s?next=/media/image/promote/ N/A reverse login N/A N/A override_settings LOGIN_URL N/A reverse login test_demote_image_view_no_permission N/A N/A self N/A N/A N/A should redirect to login if user doesn't have permission. N/A user N/A N/A self create_user N/A client N/A Client N/A N/A N/A client login username N/A user email password moo N/A response N/A N/A client post N/A reverse demote_image N/A N/A N/A self assertRedirects response N/A %s?next=/media/image/demote/ N/A reverse login N/A N/A override_settings LOGIN_URL N/A reverse login test_promote_image_view_requires_post N/A N/A self N/A N/A N/A promote image view should return 405 if http method is get. N/A response N/A N/A N/A self client get N/A reverse promote_image N/A N/A N/A self assertEqual N/A response status_code 405 N/A N/A override_settings LOGIN_URL N/A reverse login test_demote_image_view_requires_post N/A N/A self N/A N/A N/A demote image view should return 405 if http method is get. N/A response N/A N/A N/A self client get N/A reverse demote_image N/A N/A N/A self assertEqual N/A response status_code 405 N/A N/A override_settings LOGIN_URL N/A reverse login test_admin_gallery_requires_permission N/A N/A self N/A N/A N/A admin gallery should return 403 if user doesn't have permission. N/A user N/A N/A self create_user N/A client N/A Client N/A N/A N/A client login username N/A user email password moo N/A response N/A N/A client get N/A reverse admin_gallery N/A N/A N/A self assertEqual N/A response status_code 403 N/A N/A override_settings LOGIN_URL N/A reverse login test_admin_gallery_does_not_have_direct_message_images N/A N/A self N/A N/A N/A admin gallery should not include images from direct messages. N/A image N/A get_in_memory_image_instance N/A self user N/A direct_message N/A N/A self create_thread direct True N/A N/A N/A N/A N/A direct_message first_message images add image N/A response N/A N/A N/A self client get N/A reverse admin_gallery N/A N/A N/A self assertNotContains response N/A image uuid N/A test_admin_gallery_only_has_images_from_approved_messages N/A N/A self N/A N/A N/A Test that admin gallery only has images from approved messages N/A thread N/A N/A self create_thread N/A image N/A get_in_memory_image_instance N/A self user N/A N/A N/A N/A N/A thread first_message images add image N/A N/A code name MESSAGE_STATUSES N/A N/A N/A N/A thread first_message status code N/A N/A N/A N/A thread first_message save N/A view N/A AdminGalleryView N/A N/A view request N/A N/A N/A self factory get / N/A N/A N/A view request user N/A self user N/A queryset N/A N/A view get_queryset N/A N/A code approved N/A N/A N/A N/A self assertIn image queryset N/A N/A N/A N/A self assertNotIn image queryset msg N/A Status was %s. code N/A N/A ShortenedURLRedirectTest N/A ConnectMessageTestCase N/A N/A Tests for shortened_url_redirect view. test_redirects N/A N/A self N/A N/A N/A view should redirect user to the correct url. N/A url N/A N/A N/A ShortenedURL objects create url http://www.google.com N/A response N/A N/A N/A self client get N/A reverse shortened_url_redirect kwargs N/A code N/A url short_code N/A N/A N/A self assertEqual N/A response N/A Location http://www.google.com N/A test_increases_click_count N/A N/A self N/A N/A N/A view should increment click_count by one. N/A url N/A N/A N/A ShortenedURL objects create url http://www.google.com N/A click_count N/A url click_count N/A N/A N/A N/A self client get N/A reverse shortened_url_redirect kwargs N/A code N/A url short_code N/A url N/A N/A N/A ShortenedURL objects get pk N/A url pk N/A N/A N/A self assertEqual N/A url click_count N/A click_count 1 N/A N/A URLPopularityViewTest N/A ConnectMessageTestCase N/A N/A Tests for URLPopularityView. setUp N/A N/A self N/A N/A N/A Setup the URLPopularityViewTest TestCase N/A N/A self view N/A URLPopularityView N/A test_order_by_accepts_valid_values N/A N/A self N/A N/A N/A order_by in query params should sort by valid values. N/A value N/A message_count url short_code created_at N/A N/A request N/A N/A N/A self request_factory get N/A /?order_by=%s value N/A N/A N/A self view request request N/A result N/A N/A N/A self view get_queryset N/A N/A N/A self assertEqual N/A N/A result query order_by N/A N/A -%s value N/A test_order_by_defaults_to_click_count N/A N/A self N/A N/A N/A if there is no order_by in query, default to click_count. N/A request N/A N/A N/A self request_factory get / N/A N/A N/A self view request request N/A result N/A N/A N/A self view get_queryset N/A N/A N/A self assertEqual N/A N/A result query order_by N/A -click_count N/A test_order_by_is_click_count_if_value_is_invalid N/A N/A self N/A N/A N/A if order_by isn't a valid value, order by click_count. N/A request N/A N/A N/A self request_factory get /?order_by=invalid N/A N/A N/A self view request request N/A result N/A N/A N/A self view get_queryset N/A N/A N/A self assertEqual N/A N/A result query order_by N/A -click_count N/A test_order_is_asc N/A N/A self N/A N/A N/A if order is asc, queryset should be sorted ascending. N/A request N/A N/A N/A self request_factory get /?sort=asc N/A N/A N/A self view request request N/A result N/A N/A N/A self view get_queryset N/A N/A N/A self assertEqual N/A N/A result query order_by N/A click_count N/A test_order_is_desc N/A N/A self N/A N/A N/A if order is desc, queryset should be sorted descending. N/A request N/A N/A N/A self request_factory get /?sort=desc N/A N/A N/A self view request request N/A result N/A N/A N/A self view get_queryset N/A N/A N/A self assertEqual N/A N/A result query order_by N/A -click_count N/A test_order_is_other N/A N/A self N/A N/A N/A if order is invalid, default to descending. N/A request N/A N/A N/A self request_factory get /?sort=cows! N/A N/A N/A self view request request N/A result N/A N/A N/A self view get_queryset N/A N/A N/A self assertEqual N/A N/A result query order_by N/A -click_count N/A test_get_context_data_query_string_removes_order_and_order_by N/A N/A self N/A N/A N/A order and order_by keys should be removed from query string. N/A request N/A N/A N/A self request_factory get /?sort=desc&order_by=url N/A N/A N/A self view request request N/A N/A N/A self view kwargs N/A N/A result N/A N/A N/A self view get_context_data object_list N/A N/A N/A ShortenedURL objects all N/A N/A N/A self assertEqual N/A result N/A query_string N/A test_get_context_data_query_string_has_other_values N/A N/A self N/A N/A N/A 
        querystring in context should have any values that aren't filtered
         N/A request N/A N/A N/A self request_factory get /?sort=desc&order_by=url&cow=moo N/A N/A N/A self view request request N/A N/A N/A self view kwargs N/A N/A result N/A N/A N/A self view get_context_data object_list N/A N/A N/A ShortenedURL objects all N/A N/A N/A self assertEqual N/A result N/A query_string cow=moo N/A test_get_context_data_query_string_is_empty N/A N/A self N/A N/A N/A 
        query_string in context should be empty if there's no query string
         N/A request N/A N/A N/A self request_factory get / N/A N/A N/A self view request request N/A N/A N/A self view kwargs N/A N/A result N/A N/A N/A self view get_context_data object_list N/A N/A N/A ShortenedURL objects all N/A N/A N/A self assertEqual N/A result N/A query_string N/A N/A