# Path: google/auth/app_engine.py
# class Signer(crypt.Signer):
# class Credentials(
#     credentials.Scoped, credentials.Signing, credentials.CredentialsWithQuotaProject
# ):
#     def key_id(self):
#     def sign(self, message):
# def get_project_id():
#     def __init__(
#         self,
#         scopes=None,
#         default_scopes=None,
#         service_account_id=None,
#         quota_project_id=None,
#     ):
#     def refresh(self, request):
#     def service_account_email(self):
#     def requires_scopes(self):
#     def with_scopes(self, scopes, default_scopes=None):
#     def with_quota_project(self, quota_project_id):
#     def sign_bytes(self, message):
#     def signer_email(self):
#     def signer(self):


import datetime
import mock
import pytest  # type: ignore
from google.auth import app_engine
        assert not scoped_credentials.requires_scopes

    def test_with_default_scopes(self, app_identity):
        credentials = app_engine.Credentials()

        assert not credentials.scopes
        assert not credentials.default_scopes
        assert credentials.requires_scopes

        scoped_credentials = credentials.with_scopes(
            scopes=None, default_scopes=["email"]
        )

        assert scoped_credentials.has_scopes(["email"])
        assert not scoped_credentials.requires_scopes

    def test_with_quota_project(self, app_identity):
        credentials = app_engine.Credentials()

        assert not credentials.scopes
        assert not credentials.quota_project_id

        quota_project_creds = credentials.with_quota_project("project-foo")

        assert quota_project_creds.quota_project_id == "project-foo"

    def test_service_account_email_implicit(self, app_identity):
        app_identity.get_service_account_name.return_value = (
            mock.sentinel.service_account_email
        )

# Path: google/auth/app_engine.py
# class Signer(crypt.Signer):
# class Credentials(
#     credentials.Scoped, credentials.Signing, credentials.CredentialsWithQuotaProject
# ):
#     def key_id(self):
#     def sign(self, message):
# def get_project_id():
#     def __init__(
#         self,
#         scopes=None,
#         default_scopes=None,
#         service_account_id=None,
#         quota_project_id=None,
#     ):
#     def refresh(self, request):
#     def service_account_email(self):
#     def requires_scopes(self):
#     def with_scopes(self, scopes, default_scopes=None):
#     def with_quota_project(self, quota_project_id):
#     def sign_bytes(self, message):
#     def signer_email(self):
#     def signer(self):


# Path: tests/test_app_engine.py
import datetime
import mock
import pytest  # type: ignore
from google.auth import app_engine

        assert not scoped_credentials.requires_scopes

    def test_with_default_scopes(self, app_identity):
        credentials = app_engine.Credentials()

        assert not credentials.scopes
        assert not credentials.default_scopes
        assert credentials.requires_scopes

        scoped_credentials = credentials.with_scopes(
            scopes=None, default_scopes=["email"]
        )

        assert scoped_credentials.has_scopes(["email"])
        assert not scoped_credentials.requires_scopes

    def test_with_quota_project(self, app_identity):
        credentials = app_engine.Credentials()

        assert not credentials.scopes
        assert not credentials.quota_project_id

        quota_project_creds = credentials.with_quota_project("project-foo")

        assert quota_project_creds.quota_project_id == "project-foo"

    def test_service_account_email_implicit(self, app_identity):
        app_identity.get_service_account_name.return_value = (
            mock.sentinel.service_account_email
        )

        credentials = app_engine.Credentials()