def setUp(self):
        '''
        Set up method runs before each test case
        '''

        self.new_user = User("mwerumuchai", "0711215485",
                             "*****@*****.**", "mweru90")
Exemple #2
0
    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
Exemple #4
0
def create_user(user_name, password, email):
    '''
    Function to create a new user
    '''

    new_user = User(user_name, password, email)
    return new_user
Exemple #5
0
 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)
Exemple #6
0
 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)
Exemple #7
0
 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) 
Exemple #8
0
    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)
Exemple #9
0
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
Exemple #10
0
 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)
Exemple #11
0
    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)
Exemple #12
0
    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)
Exemple #14
0
    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)
Exemple #17
0
def create_user(locker_userName, locker_password):
        new_user = User(locker_userName, locker_password)
        return new_user
Exemple #18
0
 def setUp(self):
     '''
     Set up method to run before  each test
     '''
     self.new_user = User("Beryl", "Onyancha", "skittles")
Exemple #19
0
    def setUp(self):
        '''
    setUp method to run before each test cases
    '''

        self.new_user = User("User1", "TheFirst")
Exemple #20
0
def create_user(fname, lname, password):
    '''
    Function to create new user
    '''
    new_user = User(fname, lname, password)
    return new_user
Exemple #21
0
 def setUp(self):
     
     #set up method to run before each test cases
     
     self.new_user = User("kim", "5991", "*****@*****.**")
Exemple #22
0
 def setUp(self):
     """
     set up method to run before each test cases
     """
     self.new_user = User("jgovish", "12345", "*****@*****.**")
Exemple #23
0
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")