Merge pull request #391 from mongkok/test-custom-meta-setdefault

Test DjangoObjectType custom meta .setdefault()
This commit is contained in:
Syrus Akbary 2018-03-29 21:02:35 -07:00 committed by GitHub
commit d2c1e7c87b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,9 +76,9 @@ def test_django_objecttype_with_custom_meta():
abstract = True abstract = True
@classmethod @classmethod
def __init_subclass_with_meta__(cls, _meta=None, **options): def __init_subclass_with_meta__(cls, **options):
_meta = ArticleTypeOptions(cls) options.setdefault('_meta', ArticleTypeOptions(cls))
super(ArticleType, cls).__init_subclass_with_meta__(_meta=_meta, **options) super(ArticleType, cls).__init_subclass_with_meta__(**options)
class Article(ArticleType): class Article(ArticleType):
class Meta: class Meta: