Did I find the right examples for you? yes no

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/d/j/django-downloadview-HEAD/django_downloadview/tests/views.py   django-downloadview(Download)
        mixin.get_file = mock.Mock(return_value=mock.sentinel.file_wrapper)
        # Run.
        response = mixin.render_to_response()
        # Check.
        self.assertIs(response, mock.sentinel.http_not_modified_response)
        mixin.get_file = mock.Mock(return_value=mock.sentinel.file_wrapper)
        # Run.
        response = mixin.render_to_response()
        # Check.
        self.assertIs(response, mock.sentinel.download_response)
        mixin.file_not_found_response = mock.Mock()
        # Run.
        mixin.render_to_response()
        # Check.
        mixin.file_not_found_response.assert_called_once_with()

src/d/j/django-downloadview-1.6/django_downloadview/tests/views.py   django-downloadview(Download)
        mixin.get_file = mock.Mock(return_value=mock.sentinel.file_wrapper)
        # Run.
        response = mixin.render_to_response()
        # Check.
        self.assertIs(response, mock.sentinel.http_not_modified_response)
        mixin.get_file = mock.Mock(return_value=mock.sentinel.file_wrapper)
        # Run.
        response = mixin.render_to_response()
        # Check.
        self.assertIs(response, mock.sentinel.download_response)
        mixin.file_not_found_response = mock.Mock()
        # Run.
        mixin.render_to_response()
        # Check.
        mixin.file_not_found_response.assert_called_once_with()