Example #1
0
File: run.py Project: hukish/Pk
def copy_email(cls, password):
    """
    A funct that copies the email using the pyperclip framework
    We import the framework then declare a function that copies the emails.
    """
    detail_found = Detail.find_by_password(password)
    pyperclip.copy(detail_found.email)
Example #2
0
     def test_find_detail_by_password(self):
        '''
        test to check if we can find a detail by account password and display information
        '''

        self.new_detail.save_detail()
        test_detail = Detail("Test", "user", "2222222222",
                               "*****@*****.**")  # new detail
        test_detail.save_detail()

        found_detail = Detail.find_by_password("2222222222")

        self.assertEqual(found_detail.email, test_detail.email)
Example #3
0
File: run.py Project: hukish/Pk
def find_detail(password):
    """
    Function that finds a detail by password and returns the detail
    """
    return Detail.find_by_password(password)