Skip to content

Commit

Permalink
Call django.setup() for Django 1.7+ only
Browse files Browse the repository at this point in the history
  • Loading branch information
bxsx committed Sep 18, 2021
1 parent 6a7e74d commit c4f7e3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rollbar/test/test_rollbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ def test_django_build_person_data(self):
settings.configure(
INSTALLED_APPS=['django.contrib.auth', 'django.contrib.contenttypes']
)
django.setup()
if django.VERSION >= (1, 7):
django.setup()

from django.contrib.auth.models import User
from django.http.request import HttpRequest
Expand Down

0 comments on commit c4f7e3e

Please sign in to comment.