# Path: disparity/apps/salary/utils.py
# SURVEY_TOKEN_SALT = 'salary:survey'
# SURVEY_TOKEN_MAX_AGE = 60 * 60 * 24 * 7  # 7 days
# def get_survey_unique_primes(*emails):
# def generate_survey_token(seed, prime_identifier, is_admin, survey_id):
# def unsign_survey_token(token):


import pytest
from disparity.apps.salary.utils import (
    get_survey_unique_primes,
    PRIMES,
)



def test_util_function_to_pair_primes_with_emails(factories):
    emails = factories.EmailAddressFactory.create_batch(10)
    pairs = get_survey_unique_primes(*emails)
    primes = [p for e, p in pairs]

    assert len(pairs) == len(emails)
    assert len(set(primes)) == len(emails)

# Path: disparity/apps/salary/utils.py
# SURVEY_TOKEN_SALT = 'salary:survey'
# SURVEY_TOKEN_MAX_AGE = 60 * 60 * 24 * 7  # 7 days
# def get_survey_unique_primes(*emails):
# def generate_survey_token(seed, prime_identifier, is_admin, survey_id):
# def unsign_survey_token(token):


# Path: tests/salary/test_survey_prime_generation.py
import pytest
from disparity.apps.salary.utils import (
    get_survey_unique_primes,
    PRIMES,
)




def test_util_function_to_pair_primes_with_emails(factories):
    emails = factories.EmailAddressFactory.create_batch(10)
    pairs = get_survey_unique_primes(*emails)
    primes = [p for e, p in pairs]

    assert len(pairs) == len(emails)
    assert len(set(primes)) == len(emails)

    assert not set(primes).difference(PRIMES)