File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,16 @@ class S3FileConfig(AppConfig):
8
8
def ready (self ):
9
9
from django .core .files .storage import default_storage
10
10
from storages .backends .s3boto3 import S3Boto3Storage
11
+ from django import forms
12
+ from .forms import S3FileInputMixin
11
13
12
- if isinstance (default_storage , S3Boto3Storage ):
13
- from django import forms
14
- from .forms import S3FileInputMixin
14
+ if isinstance (default_storage , S3Boto3Storage ) and \
15
+ S3FileInputMixin not in forms .ClearableFileInput .__bases__ :
16
+ forms .ClearableFileInput .__bases__ = \
17
+ (S3FileInputMixin ,) + forms .ClearableFileInput .__bases__
15
18
16
- if S3FileInputMixin not in forms .ClearableFileInput .__bases__ :
17
- forms .ClearableFileInput .__bases__ = \
18
- (S3FileInputMixin ,) + forms .ClearableFileInput .__bases__
19
+ elif S3FileInputMixin in forms .ClearableFileInput .__bases__ :
20
+ forms .ClearableFileInput .__bases__ = tuple (
21
+ cls for cls in forms .ClearableFileInput .__bases__
22
+ if cls is not S3FileInputMixin
23
+ )
Original file line number Diff line number Diff line change 11
11
@pytest .yield_fixture (scope = 'session' )
12
12
def driver ():
13
13
chrome_options = webdriver .ChromeOptions ()
14
- chrome_options .add_argument ('headless' )
15
- chrome_options .add_argument ('window-size=1200x800' )
14
+ chrome_options .headless = True
16
15
try :
17
16
b = webdriver .Chrome (options = chrome_options )
18
17
except WebDriverException as e :
You can’t perform that action at this time.
0 commit comments