mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-10-31 16:07:36 +03:00 
			
		
		
		
	Fix test_should_preserve_prefetch_related
Connection resolvers have access to pagination arguments.
This commit is contained in:
		
							parent
							
								
									b63fd1cd7c
								
							
						
					
					
						commit
						8f0994e65b
					
				|  | @ -1075,7 +1075,7 @@ def test_should_preserve_prefetch_related(django_assert_num_queries): | ||||||
|     class Query(graphene.ObjectType): |     class Query(graphene.ObjectType): | ||||||
|         films = DjangoConnectionField(FilmType) |         films = DjangoConnectionField(FilmType) | ||||||
| 
 | 
 | ||||||
|         def resolve_films(root, info): |         def resolve_films(root, info, **args): | ||||||
|             qs = Film.objects.prefetch_related("reporters") |             qs = Film.objects.prefetch_related("reporters") | ||||||
|             return qs |             return qs | ||||||
| 
 | 
 | ||||||
|  | @ -1107,7 +1107,7 @@ def test_should_preserve_prefetch_related(django_assert_num_queries): | ||||||
|     schema = graphene.Schema(query=Query) |     schema = graphene.Schema(query=Query) | ||||||
|     with django_assert_num_queries(3) as captured: |     with django_assert_num_queries(3) as captured: | ||||||
|         result = schema.execute(query) |         result = schema.execute(query) | ||||||
|     assert not result.errors |         assert not result.errors | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def test_should_preserve_annotations(): | def test_should_preserve_annotations(): | ||||||
|  | @ -1160,3 +1160,4 @@ def test_should_preserve_annotations(): | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     assert result.data == expected, str(result.data) |     assert result.data == expected, str(result.data) | ||||||
|  |     assert not result.errors | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user