Created
February 21, 2021 05:41
-
-
Save khanbhai89/8c004b27ec65bdff848d092c1c041c2c to your computer and use it in GitHub Desktop.
This is custom library file for the Medium Article.
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
import random | |
import string | |
__version__ = '1.0.0' | |
class CustomLib(object): | |
ROBOT_LIBRARY_VERSION = __version__ | |
ROBOT_LIBRARY_SCOPE = 'GLOBAL' | |
def get_random_name(self, email_length): | |
letters = string.ascii_lowercase[:12] | |
return ''.join(random.choice(letters) for i in range(email_length)) | |
def generate_random_emails(self, length): | |
domains = ["hotmail.com", "gmail.com", "aol.com", | |
"mail.com", "mail.kz", "yahoo.com"] | |
return [self.get_random_name(length) | |
+ '@' | |
+ random.choice(domains)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment