import json
from django import test
from wagtail_graphql.tests.utils import GraphQLQueryTestCaseMixin


class TestGraphQLPages(GraphQLQueryTestCaseMixin, test.TestCase):

    def test_graphql_pages_query_returns_200_ok(self):
        query = """
        query {
            pages{
                wagtailcore {
                    page {
                        id
                    }
                }
            }
        }
        """
        response = self.graphql_query(query)
        self.assertEqual(response.status_code, 200)
        self.assertNotIn('errors', json.loads(response.content))

    def test_graphql_home_page_returns_200_ok(self):
        query = """
        query {
            pages{
                home {
                    homePage {
                        id
                    }
                }
            }
        }
        """
        response = self.graphql_query(query)
        self.assertEqual(response.status_code, 200)
        self.assertNotIn('errors', json.loads(response.content))

c0029936251abacff65a9e7573509c68b032872d
<mask token>


class TestGraphQLPages(GraphQLQueryTestCaseMixin, test.TestCase):
    <mask token>
    <mask token>

<mask token>


class TestGraphQLPages(GraphQLQueryTestCaseMixin, test.TestCase):
    <mask token>

    def test_graphql_home_page_returns_200_ok(self):
        query = """
        query {
            pages{
                home {
                    homePage {
                        id
                    }
                }
            }
        }
        """
        response = self.graphql_query(query)
        self.assertEqual(response.status_code, 200)
        self.assertNotIn('errors', json.loads(response.content))

<mask token>


class TestGraphQLPages(GraphQLQueryTestCaseMixin, test.TestCase):

    def test_graphql_pages_query_returns_200_ok(self):
        query = """
        query {
            pages{
                wagtailcore {
                    page {
                        id
                    }
                }
            }
        }
        """
        response = self.graphql_query(query)
        self.assertEqual(response.status_code, 200)
        self.assertNotIn('errors', json.loads(response.content))

    def test_graphql_home_page_returns_200_ok(self):
        query = """
        query {
            pages{
                home {
                    homePage {
                        id
                    }
                }
            }
        }
        """
        response = self.graphql_query(query)
        self.assertEqual(response.status_code, 200)
        self.assertNotIn('errors', json.loads(response.content))

import json
from django import test
from wagtail_graphql.tests.utils import GraphQLQueryTestCaseMixin


class TestGraphQLPages(GraphQLQueryTestCaseMixin, test.TestCase):

    def test_graphql_pages_query_returns_200_ok(self):
        query = """
        query {
            pages{
                wagtailcore {
                    page {
                        id
                    }
                }
            }
        }
        """
        response = self.graphql_query(query)
        self.assertEqual(response.status_code, 200)
        self.assertNotIn('errors', json.loads(response.content))

    def test_graphql_home_page_returns_200_ok(self):
        query = """
        query {
            pages{
                home {
                    homePage {
                        id
                    }
                }
            }
        }
        """
        response = self.graphql_query(query)
        self.assertEqual(response.status_code, 200)
        self.assertNotIn('errors', json.loads(response.content))
