This currently fails with Django 2.1 (beta), and it looks like the
decorator should be used just as is in general?!
NonAtomicDBTransactionAPIExceptionTests.test_api_exception_rollback_transaction_non_atomic_view:
../django/django/db/transaction.py:277: in _non_atomic_requests
view._non_atomic_requests.add(using)
E AttributeError: 'function' object has no attribute '_non_atomic_requests'
During handling of the above exception, another exception occurred:
tests/test_atomic_requests.py:149: in test_api_exception_rollback_transaction_non_atomic_view
response = self.client.get('/')
../django/django/test/client.py:527: in get
response = super().get(path, data=data, secure=secure, **extra)
../django/django/test/client.py:339: in get
**extra,
../django/django/test/client.py:414: in generic
return self.request(**r)
../django/django/test/client.py:477: in request
response = self.handler(environ)
../django/django/test/client.py:140: in __call__
response = self.get_response(request)
../django/django/core/handlers/base.py:81: in get_response
response = self._middleware_chain(request)
../django/django/core/handlers/exception.py:37: in inner
response = response_for_exception(request, exc)
../django/django/core/handlers/exception.py:87: in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
../django/django/core/handlers/exception.py:35: in inner
response = get_response(request)
../django/django/utils/deprecation.py:91: in __call__
response = response or self.get_response(request)
../django/django/core/handlers/exception.py:37: in inner
response = response_for_exception(request, exc)
../django/django/core/handlers/exception.py:87: in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
../django/django/core/handlers/exception.py:35: in inner
response = get_response(request)
../django/django/utils/deprecation.py:91: in __call__
response = response or self.get_response(request)
../django/django/core/handlers/exception.py:37: in inner
response = response_for_exception(request, exc)
../django/django/core/handlers/exception.py:87: in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
../django/django/core/handlers/exception.py:35: in inner
response = get_response(request)
../django/django/utils/deprecation.py:91: in __call__
response = response or self.get_response(request)
../django/django/core/handlers/exception.py:37: in inner
response = response_for_exception(request, exc)
../django/django/core/handlers/exception.py:87: in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
../django/django/core/handlers/exception.py:35: in inner
response = get_response(request)
../django/django/utils/deprecation.py:91: in __call__
response = response or self.get_response(request)
../django/django/core/handlers/exception.py:37: in inner
response = response_for_exception(request, exc)
../django/django/core/handlers/exception.py:87: in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
../django/django/core/handlers/exception.py:35: in inner
response = get_response(request)
../django/django/core/handlers/base.py:128: in _get_response
response = self.process_exception_by_middleware(e, request)
../django/django/core/handlers/base.py:126: in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
../django/django/views/decorators/csrf.py:54: in wrapped_view
return view_func(*args, **kwargs)
../django/django/views/generic/base.py:68: in view
return self.dispatch(request, *args, **kwargs)
../django/django/utils/decorators.py:42: in _wrapper
bound_method = dec(bound_method)
../django/django/db/transaction.py:285: in non_atomic_requests
return _non_atomic_requests(using, DEFAULT_DB_ALIAS)
../django/django/db/transaction.py:279: in _non_atomic_requests
view._non_atomic_requests = {using}
E AttributeError: 'method' object has no attribute '_non_atomic_requests'
1. `tests` and `--tb=short` is not necessary, since it is in
`pytest.addopts` already.
2. removes `-s` (shortcut for --capture=no): it is typically a good idea
to not display output from successful tests.
* Update the http signature auth library ref link
It seems that the djangorestframework-httpsignature package is outdated
and there is updated fork named drf-httpsig.
* Fixing the link ref format in the http signature section
It is useful to see if tests itself are covered after all - missing
coverage there typically indicates dead/missed code paths.
This also uses `source=.` and includes (with run and report), to help
Codecov with reporting.
Ref: https://github.com/encode/django-rest-framework/pull/5956
With 2.7.3 I am seeing an ImportError on Arch Linux:
> ImportError: …/.venv/lib/python3.6/site-packages/psycopg2/.libs/libresolv-2-c4c53def.5.so:
> symbol __res_maybe_init version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference