Repository: yprez/django-logentry-admin (language: python)

Issue:
Tox tests failing for py36-flake8 / Django 3.2
Tox tests for `py36-flake8` are currently failing.

There is no Django version specified for `py36-flake8`, so tox is testing with the latest version of Django, 3.2.

Django 3.2. requires a `SECRET_KEY` (source: [Django 3.2 Settings](https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-SECRET_KEY)) to run, so to fix the failing test this `SECRET_KEY` needs adding to the `conftest.py` file.

It would make sense at the same time to introduce tests for the latest versions of Python (3.9) and Django (3.2). 
Tox tests failing for py36-flake8 / Django 3.2
Tox tests for `py36-flake8` are currently failing.

There is no Django version specified for `py36-flake8`, so tox is testing with the latest version of Django, 3.2.

Django 3.2. requires a `SECRET_KEY` (source: [Django 3.2 Settings](https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-SECRET_KEY)) to run, so to fix the failing test this `SECRET_KEY` needs adding to the `conftest.py` file.

It would make sense at the same time to introduce tests for the latest versions of Python (3.9) and Django (3.2). 
Add missing dependency for Django 2.2. to fix failing Travis tests
Fixes #61 

There was a missing dependency in the `tox.ini` file for `django22`, meaning when tox tried to run the tests for enviornment `{py38,py37,py36,py35}-django22`, instead of testing against Django 2.2, it was actually testing against the latest release, Django 3.2, and failing.

This PR/fix adds the missing dependency.


Discussion / hints:

Fix patch:
diff --git a/.travis.yml b/.travis.yml
index eb122af..23287d7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,6 +16,9 @@ jobs:
     - python: 3.8
       dist: xenial
       sudo: true
+    - python: 3.9
+      dist: xenial
+      sudo: true
 
 install:
   - pip install -U packaging  # fix for Python3.4 build
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index b4135d4..b212cc3 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,6 +6,10 @@ v1.0.7 - Unreleased
 ===================
 
 * Add tests for Django 3.1.
+* Add tests for Django 3.2 LTS.
+* Test on Python 3.9 (for Django versions 2.2 LTS to present (3.2 LTS))
+* Fix failing tests for Django 2.2.
+* Fix failing lint test
 
 
 v1.0.6 - 23/04/2020
diff --git a/README.rst b/README.rst
index 427eea3..80eeb8a 100644
--- a/README.rst
+++ b/README.rst
@@ -12,8 +12,8 @@ Originally based on: `Django snippet 2484 <http://djangosnippets.org/snippets/24
 Supported versions
 ==================
 
-* Django 3.1, 3.0, 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8
-* Python 3.8, 3.7, 3.6, 3.5, 3.4, 2.7
+* Django 3.2, 3.1, 3.0, 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8
+* Python 3.9, 3.8, 3.7, 3.6, 3.5, 3.4, 2.7
 
 
 Installation
diff --git a/setup.py b/setup.py
index 06f0207..f66771c 100644
--- a/setup.py
+++ b/setup.py
@@ -41,6 +41,7 @@
         'Framework :: Django :: 2.2',
         'Framework :: Django :: 3.0',
         'Framework :: Django :: 3.1',
+        'Framework :: Django :: 3.2',
         'Intended Audience :: Developers',
         'License :: OSI Approved :: ISC License (ISCL)',
         'Natural Language :: English',
@@ -53,5 +54,6 @@
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',
+        'Programming Language :: Python :: 3.9',
     ],
 )
diff --git a/tox.ini b/tox.ini
index e31644b..e1c0d37 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,8 +1,9 @@
 [tox]
 envlist =
-    {py38,py37,py36}-django31,
-    {py38,py37,py36}-django30,
-    {py38,py37,py36,py35}-django22,
+    {py39,py38,py37,py36}-django32,
+    {py39,py38,py37,py36}-django31,
+    {py39,py38,py37,py36}-django30,
+    {py39,py38,py37,py36,py35}-django22,
     {py37,py36,py35}-django21,
     {py37,py36,py35,py34}-django20,
     {py37,py36,py35,py34,py27}-{django111},
@@ -17,8 +18,10 @@ deps =
     django111: Django>=1.11,<2.0
     django20: Django>=2.0,<2.1
     django21: Django>=2.1,<2.2
+    django22: Django>=2.2,<2.3
     django30: Django>=3.0,<3.1
     django31: Django>=3.1,<3.2
+    django32: Django>=3.2,<3.3
     coverage
     pytest
     pytest-cov


Test patch:
diff --git a/tests/conftest.py b/tests/conftest.py
index eb3d72c..e699050 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,3 +1,5 @@
+import random
+
 from django.conf import settings
 
 
@@ -34,4 +36,8 @@ def pytest_configure():
                 ],
             },
         }],
+        SECRET_KEY=''.join(
+            random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)")
+            for _ in range(50)
+        ),
     )