-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from saritasa-nest/feature/improve-coverage
Prepare tests for celery admin mixins
- Loading branch information
Showing
13 changed files
with
388 additions
and
217 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import typing | ||
|
||
from import_export import admin as import_export_admin | ||
|
||
from . import types | ||
|
||
|
||
class BaseCeleryImportExportAdminMixin( | ||
import_export_admin.ImportExportMixinBase, | ||
): | ||
"""Extend base mixin with common logic for import/export.""" | ||
|
||
@property | ||
def model_info(self) -> types.ModelInfo: | ||
"""Get info of model.""" | ||
return types.ModelInfo( | ||
meta=self.model._meta, | ||
) | ||
|
||
def get_context_data(self, **kwargs) -> dict[str, typing.Any]: | ||
"""Get context data.""" | ||
return {} |
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
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
Oops, something went wrong.