# Path: federation/protocols/activitypub/signing.py
# def get_http_authentication(private_key: RsaKey, private_key_id: str) -> HTTPSignatureHeaderAuth:
#     """
#     Get HTTP signature authentication for a request.
#     """
#     key = private_key.exportKey()
#     return HTTPSignatureHeaderAuth(
#         headers=["(request-target)", "user-agent", "host", "date"],
#         algorithm="rsa-sha256",
#         key=key,
#         key_id=private_key_id,
#     )
# 
# Path: federation/tests/fixtures/keys.py
# def get_dummy_private_key():
#     return RSA.importKey(PRIVATE_KEY)


from federation.protocols.activitypub.signing import get_http_authentication
from federation.tests.fixtures.keys import get_dummy_private_key


def test_signing_request():
    key = get_dummy_private_key()
    auth = get_http_authentication(key, "dummy_key_id")
    assert auth.algorithm == 'rsa-sha256'

# Path: federation/protocols/activitypub/signing.py
# def get_http_authentication(private_key: RsaKey, private_key_id: str) -> HTTPSignatureHeaderAuth:
#     """
#     Get HTTP signature authentication for a request.
#     """
#     key = private_key.exportKey()
#     return HTTPSignatureHeaderAuth(
#         headers=["(request-target)", "user-agent", "host", "date"],
#         algorithm="rsa-sha256",
#         key=key,
#         key_id=private_key_id,
#     )
# 
# Path: federation/tests/fixtures/keys.py
# def get_dummy_private_key():
#     return RSA.importKey(PRIVATE_KEY)


# Path: federation/tests/protocols/activitypub/test_signing.py
from federation.protocols.activitypub.signing import get_http_authentication
from federation.tests.fixtures.keys import get_dummy_private_key



def test_signing_request():
    key = get_dummy_private_key()
    auth = get_http_authentication(key, "dummy_key_id")
    assert auth.algorithm == 'rsa-sha256'

    assert auth.headers == [