def setUp(self): ''' Set up method runs before each test case ''' self.new_user = User("mwerumuchai", "0711215485", "*****@*****.**", "mweru90")
def setUp(self): ''' Set up method to run before each test cases. ''' self.new_user = User("toni", "1234", "*****@*****.**") # create contact object
def setUp(self): ''' Set up method to run before each test cases. ''' self.new_user = User("Collins", "Akumu", "akumu_collins", "4321", "4321") # create user object
def create_user(user_name, password, email): ''' Function to create a new user ''' new_user = User(user_name, password, email) return new_user
def test_save_multiple_user(self): ''' test_save_multiple_user to check if we can save multiple user objects to our user_list ''' self.new_user.save_user() test_user = User("Test", "0000", "*****@*****.**") # new user test_user.save_user() self.assertEqual(len(User.user_list), 2)
def test_save_multiple_user(self): """ Test to check whether we can save multiple user objects. """ self.new_user.user_save() test_user = User("puppah", "78945632", "*****@*****.**") test_user.user_save() self.assertEqual(len(User.user_list), 2)
def test_save_multiple_user(self): #Test to check whether we can save multiple user objects. self.new_user.user_save() test_user = User("mami","716491250","*****@*****.**") test_user.user_save() self.assertEqual(len(User.user_list),2)
def test_save_user(self): ''' test_save_user case to test if object is saved to user_list list ''' self.test_user = User("User2", "The2") self.test_user.save_user() self.assertEqual(len(User.user_list), 1)
def create_signup(first_name, last_name, created_user_name, created_user_password, confirm_password): """ Function to create a first time signup """ new_user = User(first_name, last_name, created_user_name, created_user_password, confirm_password) return new_user
def test_delete_user(self): ''' Test to check if users can be deleted from the users list ''' self.new_user.save_user() test_user = User("Test", "user", "1234") test_user.save_user() self.new_user.delete_user() self.assertEqual(len(User.user_list), 1)
def test_save_multiple_user(self): ''' test_save_multiple_user case to test if multiple user objects can be saved to user_list ''' self.test_user = User("User2", "The2") self.new_user.save_user() self.test_user.save_user() self.assertEqual(len(User.user_list), 2)
def test_delete_user(self): ''' test_delete_user to test if we can remove a user from our user list ''' self.new_user.save_user() test_user = User("Test", "0000", "*****@*****.**") # new user test_user.save_user() self.new_user.delete_user() # Deleting a user object self.assertEqual(len(User.user_list), 1)
def test_save_multiple_user(self): ''' Test save multiple user test case to see whether we can save multiple user accounts to our user list ''' self.new_user.save_user() test_user = User("marymukami", "0714253689", "*****@*****.**", "mary90") test_user.save_user() self.assertEqual(len(User.user_list), 2)
def test_delete_user(self): ''' test_delete_user case to test if user can be deleted from user_list ''' self.new_user.save_user() self.test_user = User("User2", "The2") self.test_user.save_user() self.test_user.delete_user() self.assertEqual(len(User.user_list), 1)
def test_user_exists(self): ''' Test to check if we can return a Boolean if account isn't found ''' self.new_user.save_user() test_user = User("marymukami", "0714253689", "*****@*****.**", "mary90") test_user.save_user() user_exists = User.user_exists("marymukami") self.assertTrue(user_exists)
def test_login(self): ''' Test to check if user can log into their credentials ''' self.new_user.save_user() #saving new user test_user = User("mwerumuchai", "07142536", "*****@*****.**", "mweru90") test_user.save_user() # Connect with credential account found_credential = User.login("mwerumuchai", "07142536", "*****@*****.**", "mweru90") self.assertEqual(found_credential, Credential.credential_account_list)
def create_user(locker_userName, locker_password): new_user = User(locker_userName, locker_password) return new_user
def setUp(self): ''' Set up method to run before each test ''' self.new_user = User("Beryl", "Onyancha", "skittles")
def setUp(self): ''' setUp method to run before each test cases ''' self.new_user = User("User1", "TheFirst")
def create_user(fname, lname, password): ''' Function to create new user ''' new_user = User(fname, lname, password) return new_user
def setUp(self): #set up method to run before each test cases self.new_user = User("kim", "5991", "*****@*****.**")
def setUp(self): """ set up method to run before each test cases """ self.new_user = User("jgovish", "12345", "*****@*****.**")
def create_user(user_name, password, email): """ Function to create a new user. """ new_user = User(user_name,password, email) return new_user
def setUp(self): self.new_user = User("Vincentmuya", "vincent12345")