From 459270cc090c07ddac46407d6517fb179c499b21 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Sat, 15 Oct 2016 16:04:32 -0700 Subject: [PATCH] Fixed tests --- graphene_django/tests/test_converter.py | 8 ++++---- graphene_django/tests/test_types.py | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/graphene_django/tests/test_converter.py b/graphene_django/tests/test_converter.py index a3ebd0a..c8b6e01 100644 --- a/graphene_django/tests/test_converter.py +++ b/graphene_django/tests/test_converter.py @@ -124,10 +124,10 @@ def test_field_with_choices_convert_enum(): graphene_type = convert_django_field_with_choices(field) assert isinstance(graphene_type, graphene.Enum) assert graphene_type._meta.name == 'TranslatedModelLanguage' - assert graphene_type._meta.enum.__members__['SPANISH'].value == 'es' - assert graphene_type._meta.enum.__members__['SPANISH'].description == 'Spanish' - assert graphene_type._meta.enum.__members__['ENGLISH'].value == 'en' - assert graphene_type._meta.enum.__members__['ENGLISH'].description == 'English' + assert graphene_type._meta.enum.__members__['ES'].value == 'es' + assert graphene_type._meta.enum.__members__['ES'].description == 'Spanish' + assert graphene_type._meta.enum.__members__['EN'].value == 'en' + assert graphene_type._meta.enum.__members__['EN'].description == 'English' def test_field_with_grouped_choices(): diff --git a/graphene_django/tests/test_types.py b/graphene_django/tests/test_types.py index c0d88a2..2510e1d 100644 --- a/graphene_django/tests/test_types.py +++ b/graphene_django/tests/test_types.py @@ -39,7 +39,7 @@ def test_django_interface(): @patch('graphene_django.tests.models.Article.objects.get', return_value=Article(id=1)) def test_django_get_node(get): article = Article.get_node(1, None, None) - get.assert_called_with(id=1) + get.assert_called_with(pk=1) assert article.id == 1 @@ -81,13 +81,13 @@ type ArticleEdge { } enum ArticleImportance { - VERY_IMPORTANT - NOT_AS_IMPORTANT + A_1 + A_2 } enum ArticleLang { - SPANISH - ENGLISH + ES + EN } scalar DateTime @@ -114,8 +114,8 @@ type Reporter { } enum ReporterA_choice { - THIS - THAT + A_1 + A_2 } type RootQuery {