Skip to content

Commit 459270c

Browse files
committed
Fixed tests
1 parent 3a9ffba commit 459270c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

graphene_django/tests/test_converter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ class Meta:
124124
graphene_type = convert_django_field_with_choices(field)
125125
assert isinstance(graphene_type, graphene.Enum)
126126
assert graphene_type._meta.name == 'TranslatedModelLanguage'
127-
assert graphene_type._meta.enum.__members__['SPANISH'].value == 'es'
128-
assert graphene_type._meta.enum.__members__['SPANISH'].description == 'Spanish'
129-
assert graphene_type._meta.enum.__members__['ENGLISH'].value == 'en'
130-
assert graphene_type._meta.enum.__members__['ENGLISH'].description == 'English'
127+
assert graphene_type._meta.enum.__members__['ES'].value == 'es'
128+
assert graphene_type._meta.enum.__members__['ES'].description == 'Spanish'
129+
assert graphene_type._meta.enum.__members__['EN'].value == 'en'
130+
assert graphene_type._meta.enum.__members__['EN'].description == 'English'
131131

132132

133133
def test_field_with_grouped_choices():

graphene_django/tests/test_types.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_django_interface():
3939
@patch('graphene_django.tests.models.Article.objects.get', return_value=Article(id=1))
4040
def test_django_get_node(get):
4141
article = Article.get_node(1, None, None)
42-
get.assert_called_with(id=1)
42+
get.assert_called_with(pk=1)
4343
assert article.id == 1
4444

4545

@@ -81,13 +81,13 @@ def test_schema_representation():
8181
}
8282
8383
enum ArticleImportance {
84-
VERY_IMPORTANT
85-
NOT_AS_IMPORTANT
84+
A_1
85+
A_2
8686
}
8787
8888
enum ArticleLang {
89-
SPANISH
90-
ENGLISH
89+
ES
90+
EN
9191
}
9292
9393
scalar DateTime
@@ -114,8 +114,8 @@ def test_schema_representation():
114114
}
115115
116116
enum ReporterA_choice {
117-
THIS
118-
THAT
117+
A_1
118+
A_2
119119
}
120120
121121
type RootQuery {

0 commit comments

Comments
 (0)