diff --git a/ivatar/utils.py b/ivatar/utils.py index 7227991..bbfd797 100644 --- a/ivatar/utils.py +++ b/ivatar/utils.py @@ -178,6 +178,16 @@ def random_string(length=10): ) +def generate_random_email(): + """ + Generate a random email address using the same pattern as test_views.py + """ + username = random_string() + domain = random_string() + tld = random_string(2) + return f"{username}@{domain}.{tld}" + + def random_ip_address(): """ Return a random IP address (IPv4)