def test_has_a_method_to_generate_a_random_password(self): """... it has a method to generate a random password""" mt = MailTm() password1 = mt._generate_password(10) password2 = mt._generate_password(10) assert type(password1) is str assert len(password1) == 10 assert password1 != password2
def create_new_account() -> Tuple[str, str, Dict[str, str]]: """ use MailTm._make_account_request to create a new random account """ mt = MailTm() domain = mt._get_domains_list()[0] username = generate_username(1)[0].lower() address = f"{username}@{domain}" password = mt._generate_password(6) response = mt._make_account_request("accounts", address, password) return address, password, response