mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-25 19:14:11 +03:00
Fixed tests
This commit is contained in:
parent
3a9ffba560
commit
459270cc09
|
@ -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():
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user