django-cookie-consent
django-cookie-consent copied to clipboard
Fix middleware
Solves #13 and #33
Can you please add (regression) tests?
We would probably need to do something like this:
Database values for cookie name, path, and domain must match the third party cookie values that are stored in your browser. You must also have the middleware inserted in your settings.py.
MIDDLEWARE = [
'cookie_consent.middleware.CleanCookiesMiddleware',
]
Test 1: Create cookie group Accept cookie group Populate third party cookies in the browser Delete cookie_consent cookie
Test 2: Create cookie group Accept cookie group Populate third party cookies in the browser Decline cookie group
To get started with tests do the following:
Download the entire zip file of django-cookie-consent pip3 install django-appconf cd Downloads/django-cookie-consent-master python3 -m pipenv shell Make a file inside Downloads/django-cookie-consent-master/tests/core/tests called test_middleware.py with class MiddlewareTest python3 manage.py test core.tests.test_middleware.MiddlewareTest
@sergei-maertens - Please check the tests I made.