# 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
# See the License for the specific language governing permissions and
# limitations under the License.





class _AppIdentityModule(object):
    """The interface of the App Idenity app engine module.
    See https://cloud.google.com/appengine/docs/standard/python/refdocs
    /google.appengine.api.app_identity.app_identity
    """

    def get_application_id(self):
        raise NotImplementedError()

    def sign_blob(self, bytes_to_sign, deadline=None):
        raise NotImplementedError()

    def get_service_account_name(self, deadline=None):
        raise NotImplementedError()

    def get_access_token(self, scopes, service_account_id=None):
        raise NotImplementedError()


@pytest.fixture
def app_identity(monkeypatch):
    """Mocks the app_identity module for google.auth.app_engine."""
    app_identity_module = mock.create_autospec(_AppIdentityModule, instance=True)

# 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

# See the License for the specific language governing permissions and
# limitations under the License.





class _AppIdentityModule(object):
    """The interface of the App Idenity app engine module.
    See https://cloud.google.com/appengine/docs/standard/python/refdocs
    /google.appengine.api.app_identity.app_identity
    """

    def get_application_id(self):
        raise NotImplementedError()

    def sign_blob(self, bytes_to_sign, deadline=None):
        raise NotImplementedError()

    def get_service_account_name(self, deadline=None):
        raise NotImplementedError()

    def get_access_token(self, scopes, service_account_id=None):
        raise NotImplementedError()


@pytest.fixture
def app_identity(monkeypatch):
    """Mocks the app_identity module for google.auth.app_engine."""
    app_identity_module = mock.create_autospec(_AppIdentityModule, instance=True)

    monkeypatch.setattr(app_engine, "app_identity", app_identity_module)