Skip to content

Commit baf1e6a

Browse files
author
Austin Pua
committed
Fixed failing tests for Django 1.10
1 parent 562e072 commit baf1e6a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22

3+
import django
34
from django.conf import settings
45
from django.utils import six
56

@@ -17,6 +18,11 @@ def _(path):
1718

1819
class pipeline_settings(override_settings):
1920
def __init__(self, **kwargs):
21+
if django.VERSION[:2] >= (1, 10):
22+
# Django 1.10's override_settings inherits from TestContextDecorator
23+
# and its __init__ method calls its superclass' __init__ method too,
24+
# so we must do the same.
25+
super(pipeline_settings, self).__init__()
2026
self.options = {'PIPELINE': kwargs}
2127

2228

0 commit comments

Comments
 (0)