"""Custom fuzzy fields.""" import random from factory.fuzzy import BaseFuzzyAttribute from video.constants import access_control class FuzzyOrchardUserId(BaseFuzzyAttribute): # type: ignore[type-arg] """FuzzyOrchardUserId Class.""" def fuzz(self) -> str: """Generate orchard account ids.""" random_prefix = random.choice(access_control.USER_TYPES) random_account_id = random.randint(1, 999999) return "{}:{}".format(random_prefix, random_account_id)