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)
def test_login_True(self): self.assertTrue(controller.create_user('admin', 'password')) self.assertTrue(controller.login('admin', 'password'))
def test_exportData_True(self): self.assertTrue(controller.create_user('john', 'password')) self.assertTrue(controller.export_data())
def test_createAdmin_True(self): self.assertTrue(controller.create_user('john', 'password'))