Example #1
0
def create_user():
    """
    Create a user
    """
    print('No database found!\nCreate a user!')
    user = str(input('Username: '******'Password: '******'Password again: ')
    while password1 != password2:
        print('Passwords didnt match')
        password1 = getpass('Password: '******'Password again: ')
    controller.create_user(user, password1)
Example #2
0
 def test_login_True(self):
     self.assertTrue(controller.create_user('admin', 'password'))
     self.assertTrue(controller.login('admin', 'password'))
Example #3
0
 def test_exportData_True(self):
     self.assertTrue(controller.create_user('john', 'password'))
     self.assertTrue(controller.export_data())
Example #4
0
 def test_createAdmin_True(self):
     self.assertTrue(controller.create_user('john', 'password'))