Skip to content

Commit 55dc657

Browse files
author
mongkok
committed
Test custom meta .setdefault()
1 parent e827b10 commit 55dc657

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphene_django/tests/test_types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ class Meta:
7676
abstract = True
7777

7878
@classmethod
79-
def __init_subclass_with_meta__(cls, _meta=None, **options):
80-
_meta = ArticleTypeOptions(cls)
81-
super(ArticleType, cls).__init_subclass_with_meta__(_meta=_meta, **options)
79+
def __init_subclass_with_meta__(cls, **options):
80+
options.setdefault('_meta', ArticleTypeOptions(cls))
81+
super(ArticleType, cls).__init_subclass_with_meta__(**options)
8282

8383
class Article(ArticleType):
8484
class Meta:

0 commit comments

Comments
 (0)