Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sshin/fix/1859 add tests #963

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

suejung-sentry
Copy link
Contributor

Purpose/Motivation

What is the feature? Why is this being done?

Links to relevant tickets

What does this PR do?

Include a brief description of the changes in this PR. Bullet points are your friend.

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@codecov-staging
Copy link

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2619 1 2618 6
View the top 1 failed tests by shortest run time
graphql_api/tests/test_views.py::AriadneViewTestCase::test_when_bad_query_and_anonymous
Stack Traces | 0.017s run time
self = <graphql_api.tests.test_views.AriadneViewTestCase testMethod=test_when_bad_query_and_anonymous>

    @override_settings(DEBUG=False)
    async def test_when_bad_query_and_anonymous(self):
        schema = generate_schema_that_raise_with(Unauthorized())
        data = await self.do_query(schema, " { fieldThatDoesntExist }")
        assert data["errors"] is not None
>       assert data["errors"][0]["message"] == "INTERNAL SERVER ERROR"
E       assert "Cannot query...type 'Query'." == 'INTERNAL SERVER ERROR'
E         
E         - INTERNAL SERVER ERROR
E         + Cannot query field 'fieldThatDoesntExist' on type 'Query'.

graphql_api/tests/test_views.py:131: AssertionError

To view more test analytics go to the Test Analytics Dashboard
Got feedback? Let us know on Github

@codecov-qa
Copy link

codecov-qa bot commented Nov 6, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2619 1 2618 6
View the top 1 failed tests by shortest run time
graphql_api/tests/test_views.py::AriadneViewTestCase::test_when_bad_query_and_anonymous
Stack Traces | 0.017s run time
self = <graphql_api.tests.test_views.AriadneViewTestCase testMethod=test_when_bad_query_and_anonymous>

    @override_settings(DEBUG=False)
    async def test_when_bad_query_and_anonymous(self):
        schema = generate_schema_that_raise_with(Unauthorized())
        data = await self.do_query(schema, " { fieldThatDoesntExist }")
        assert data["errors"] is not None
>       assert data["errors"][0]["message"] == "INTERNAL SERVER ERROR"
E       assert "Cannot query...type 'Query'." == 'INTERNAL SERVER ERROR'
E         
E         - INTERNAL SERVER ERROR
E         + Cannot query field 'fieldThatDoesntExist' on type 'Query'.

graphql_api/tests/test_views.py:131: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
Got feedback? Let us know on Github

Copy link

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 2625 tests with 1 failed, 2618 passed and 6 skipped.

View the full list of failed tests

pytest

  • Class name: graphql_api.tests.test_views.AriadneViewTestCase
    Test name: test_when_bad_query_and_anonymous

    self = <graphql_api.tests.test_views.AriadneViewTestCase testMethod=test_when_bad_query_and_anonymous>

    @override_settings(DEBUG=False)
    async def test_when_bad_query_and_anonymous(self):
    schema = generate_schema_that_raise_with(Unauthorized())
    data = await self.do_query(schema, " { fieldThatDoesntExist }")
    assert data["errors"] is not None
    > assert data["errors"][0]["message"] == "INTERNAL SERVER ERROR"
    E assert "Cannot query...type 'Query'." == 'INTERNAL SERVER ERROR'
    E
    E - INTERNAL SERVER ERROR
    E + Cannot query field 'fieldThatDoesntExist' on type 'Query'.

    graphql_api/tests/test_views.py:131: AssertionError

Copy link

codecov bot commented Nov 6, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2619 1 2618 6
View the top 1 failed tests by shortest run time
graphql_api/tests/test_views.py::AriadneViewTestCase::test_when_bad_query_and_anonymous
Stack Traces | 0.017s run time
self = &lt;graphql_api.tests.test_views.AriadneViewTestCase testMethod=test_when_bad_query_and_anonymous&gt;

    @override_settings(DEBUG=False)
    async def test_when_bad_query_and_anonymous(self):
        schema = generate_schema_that_raise_with(Unauthorized())
        data = await self.do_query(schema, " { fieldThatDoesntExist }")
        assert data["errors"] is not None
&gt;       assert data["errors"][0]["message"] == "INTERNAL SERVER ERROR"
E       assert "Cannot query...type 'Query'." == 'INTERNAL SERVER ERROR'
E         
E         - INTERNAL SERVER ERROR
E         + Cannot query field 'fieldThatDoesntExist' on type 'Query'.

graphql_api/tests/test_views.py:131: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
Got feedback? Let us know on Github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant