-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
244b008
commit 8b23dd5
Showing
3 changed files
with
56 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os | ||
Check failure on line 1 in example/winners/tests/test_fields.py GitHub Actions / flake8
|
||
from django.test import TestCase, override_settings | ||
from django.core.files.base import ContentFile | ||
Check failure on line 3 in example/winners/tests/test_fields.py GitHub Actions / flake8
|
||
|
||
from import_export_celery.fields import lazy_initialize_storage_class | ||
|
||
|
||
class InitializeStorageClassTests(TestCase): | ||
|
||
@override_settings( | ||
IMPORT_EXPORT_CELERY_STORAGE="foo" | ||
) | ||
def test_lazy_initialize_storage_class_old_style(self): | ||
self.assertEquals(lazy_initialize_storage_class(), "foo") | ||
|
||
|
||
@override_settings( | ||
Check failure on line 17 in example/winners/tests/test_fields.py GitHub Actions / flake8
|
||
IMPORT_EXPORT_CELERY_STORAGE_ALIAS="import_export_celery", | ||
STORAGES={ | ||
"import_export_celery": { | ||
"BACKEND": "bar", | ||
} | ||
} | ||
) | ||
def test_lazy_initialize_storage_class_new_style(self): | ||
self.assertEquals(lazy_initialize_storage_class(), "bar") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters