<reponame>Arnoldblair/p-locker<gh_stars>0
import unittest
from users import User

class TestPassword(unittest.TestCase):
    '''
    Test class that defines test cases for the Password class behaviours
    '''

    def setUp(self):      
        
        
        self.new_users = User("Arnold","munene12")
       


    def tearDown(self):
        '''
        Tear down method that does clean up after each test case has run
        '''
        User.users_list = []
        

    def test__init(self):
        '''
        Test to check whether the credentials objects are instantiated correctly
        '''
        
        self.assertEqual(self.new_users.user_name,"Blair")
        self.assertEqual(self.new_users.user_passwrd,"<PASSWORD>")

    def test_save_users(self):
        '''
        Test to check if the object is saved into the users list
        '''
        self.new_users.save_user()
        self.assertEqual(len(User.users_list),1)

    # def test_authenticate_user(self):
    #     '''
    #     This method tests user authentication
    #     '''
    #     self.assertTrue(self.new_users.user_authenticate("Blair", "munene12"))

  


if __name__ == '__main__':
    unittest.main()