@patch('open_connect.media.views.cache')
    def test_image_view_uses_correct_hash_key(self, mock):
        mock.get.return_value = None
        image = get_in_memory_image_instance(self.user)
        image.uuid = 'uuid-here'
        image.save()

        response = image_view(
            self.request, image.uuid, image_type='display_image')
        self.assertEqual(response.url, image.get_display_image.url)
        mock.get.assert_called_once_with(
            'imageurlcache_display_image_uuid-here')
        mock.set.assert_called_once_with(
            'imageurlcache_display_image_uuid-here',
            image.get_display_image.url,
            2700
        )
        display_image = Image.objects.get(pk=image.pk)
        self.assertEqual(display_image.view_count, 1)
Viewing an alternate size (thumbnail) should not increment count.
dataset/ETHPy150Open ofa/connect/open_connect/media/tests/test_views.py/ImageViewsTest.test_image_view_uses_correct_hash_key