Repository: honeybadger-io/honeybadger-python (language: python)

Issue:
upside-down logic in Django tests
What is the purpose of this?

https://github.com/honeybadger-io/honeybadger-python/blob/65215a97318bda878c8b23bbf64e5ff6cf3fd854/honeybadger/tests/contrib/test_django.py#L32-L45

It appears to be both unmaintained and upside-down.

For example, on Python 3.9 with any current Django LTS release, it will skip 3 tests that I belive it should be running. I.e. disabling the `@unittest.skipUnless(versions_match())` decorator and the tests still pass just fine.

Clearly I'm missing something. Because just removing the above, and any invalid paring of Python/Django versions should still generate their own errors.


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb644c4..8295691 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,8 @@ adheres to [Semantic Versioning](http://semver.org/).
 
 ## [Unreleased]
 - Django example actually generates an alert
-- target Django v4 in CI but not with Python v3.7
+- Target Django v4 in CI but not with Python v3.7
+- Added Django v3.2 and v4.2 in version matrix for tests
 
 ## [0.15.2] - 2023-03-31
 - honeybadger.notify() now returns notice uuid (#139) 


Test patch:
diff --git a/honeybadger/tests/contrib/test_django.py b/honeybadger/tests/contrib/test_django.py
index cdd9a14..eb9d50c 100644
--- a/honeybadger/tests/contrib/test_django.py
+++ b/honeybadger/tests/contrib/test_django.py
@@ -36,7 +36,9 @@ def versions_match():
         '1.11': sys.version_info >= (3, 5),
         '2.2':  sys.version_info >= (3, 5),
         '3.0':  sys.version_info >= (3, 6),
-        '3.1':  sys.version_info >= (3, 6)
+        '3.1':  sys.version_info >= (3, 6),
+        '3.2':  sys.version_info >= (3, 6),
+        '4.2':  sys.version_info >= (3, 8)
     }
 
     for django_version, supported in VERSION_MATRIX.items():
@@ -191,4 +193,4 @@ def assert_payload(req):
             except:
                 pass
             self.assertTrue(request_mock.called)
-        
\ No newline at end of file
+