-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9817fd
commit 687397e
Showing
4 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
""" | ||
import datetime | ||
import hashlib | ||
from itertools import islice | ||
import json | ||
import os | ||
import re | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
Utility functions for tests | ||
""" | ||
import math | ||
import random | ||
import string | ||
|
||
|
||
def generate_emails_and_ids(num_emails): | ||
""" | ||
Generates random emails with random uuids used primarily to test length constraints | ||
""" | ||
emails_and_ids = { | ||
''.join(random.choices(string.ascii_uppercase + | ||
string.digits, k=8)) + '@gmail.com': math.floor(random.random() * 1000) | ||
for _ in range(num_emails) | ||
} | ||
return emails_and_ids |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters