# Path: atlassian_jwt_auth/tests/utils.py
# def get_new_rsa_private_key_in_pem_format():
# def get_public_key_pem_for_private_key_pem(private_key_pem):
# def get_example_jwt_auth_signer(**kwargs):
# def create_token(issuer, audience, key_id, private_key, subject=None):
#     def get_new_private_key_in_pem_format(self):
#     def algorithm(self):
#     def get_new_private_key_in_pem_format(self):
#     def algorithm(self):
#     def get_new_private_key_in_pem_format(self):
# class BaseJWTAlgorithmTestMixin(object):
# class RS256KeyTestMixin(object):
# class ES256KeyTestMixin(object):


import datetime
import unittest
import atlassian_jwt_auth
from unittest import mock
from cryptography.hazmat.primitives import serialization
from atlassian_jwt_auth.tests import utils
            algorithm=self.algorithm,
        )
        jwt_auth_signer._generate_claims = lambda aud: expected_claims
        jwt_auth_signer.generate_jwt(expected_aud)
        m_jwt_encode.assert_called_with(
            expected_claims,
            key=mock.ANY,
            algorithm=self.algorithm,
            headers={'kid': expected_key_id})
        for name, args, kwargs in m_jwt_encode.mock_calls:
            if not kwargs:
                self.assertEqual(args[0], 'utf-8')
                continue
            call_private_key = kwargs['key'].private_bytes(
                encoding=serialization.Encoding.PEM,
                format=serialization.PrivateFormat.TraditionalOpenSSL,
                encryption_algorithm=serialization.NoEncryption()
            )
            self.assertEqual(call_private_key, self._private_key_pem)


class JWTAuthSignerRS256Test(
        BaseJWTAuthSignerTest,
        utils.RS256KeyTestMixin,
        unittest.TestCase):
    pass


class JWTAuthSignerES256Test(
        BaseJWTAuthSignerTest,

# Path: atlassian_jwt_auth/tests/utils.py
# def get_new_rsa_private_key_in_pem_format():
# def get_public_key_pem_for_private_key_pem(private_key_pem):
# def get_example_jwt_auth_signer(**kwargs):
# def create_token(issuer, audience, key_id, private_key, subject=None):
#     def get_new_private_key_in_pem_format(self):
#     def algorithm(self):
#     def get_new_private_key_in_pem_format(self):
#     def algorithm(self):
#     def get_new_private_key_in_pem_format(self):
# class BaseJWTAlgorithmTestMixin(object):
# class RS256KeyTestMixin(object):
# class ES256KeyTestMixin(object):


# Path: atlassian_jwt_auth/tests/test_signer.py
import datetime
import unittest
import atlassian_jwt_auth
from unittest import mock
from cryptography.hazmat.primitives import serialization
from atlassian_jwt_auth.tests import utils

            algorithm=self.algorithm,
        )
        jwt_auth_signer._generate_claims = lambda aud: expected_claims
        jwt_auth_signer.generate_jwt(expected_aud)
        m_jwt_encode.assert_called_with(
            expected_claims,
            key=mock.ANY,
            algorithm=self.algorithm,
            headers={'kid': expected_key_id})
        for name, args, kwargs in m_jwt_encode.mock_calls:
            if not kwargs:
                self.assertEqual(args[0], 'utf-8')
                continue
            call_private_key = kwargs['key'].private_bytes(
                encoding=serialization.Encoding.PEM,
                format=serialization.PrivateFormat.TraditionalOpenSSL,
                encryption_algorithm=serialization.NoEncryption()
            )
            self.assertEqual(call_private_key, self._private_key_pem)


class JWTAuthSignerRS256Test(
        BaseJWTAuthSignerTest,
        utils.RS256KeyTestMixin,
        unittest.TestCase):
    pass


class JWTAuthSignerES256Test(
        BaseJWTAuthSignerTest,

        utils.ES256KeyTestMixin,