import pytest

from eth_utils import (
    add_0x_prefix,
    decode_hex,
    remove_0x_prefix,
    to_canonical_address,
    to_checksum_address,
    to_normalized_address,
)

from eth_accounts.ciphers import ciphers
from eth_accounts.kdfs import kdfs
from eth_accounts.validation import validate_keystore
from eth_accounts import (
    InvalidKeystore,
    UnsupportedKeystore,
)

from .fixtures import keystore


def test_template_valid(keystore):
    validate_keystore(keystore)


def test_no_missing_required_fields():
    required_fields = ['crypto', 'version']
    for field in required_fields:
        k = keystore()