Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add benchmark for fulfillment resolvers (#9700)

Krzysztof Kwaśniak392503be778f
diff --git a/saleor/graphql/order/tests/benchmark/test_fulfillment.py b/saleor/graphql/order/tests/benchmark/test_fulfillment.py
new file mode 100644
index 0000000000..a589b0c2c8
--- /dev/null
+++ b/saleor/graphql/order/tests/benchmark/test_fulfillment.py
@@ -0,0 +1,43 @@
+import pytest
+
+from ....tests.utils import get_graphql_content
+
+FULFILLMENT_QUERY = """
+query {
+ orders(first:100) {
+ edges {
+ node {
+ id
+ fulfillments {
+ id
+ status
+ lines {
+ id
+ quantity
+ orderLine {
+ id
+ }
+ }
+ }
+ }
+ }
+ }
+}
+"""
+
+
[email protected]_queries(autouse=False)
+def test_fulfillment_query(
+ staff_api_client,
+ orders_for_benchmarks,
+ permission_manage_orders,
+ count_queries,
+):
+ get_graphql_content(
+ staff_api_client.post_graphql(
+ FULFILLMENT_QUERY,
+ permissions=[permission_manage_orders],
+ check_no_permissions=False,
+ )
+ )