def put(): if request.method == 'POST': #print(request.form) clients = Users.update_user(request.form["number"], request.form["firstname"], request.form["lastname"], request.form["midname"], request.form["birthday"]) return render_template('put_user.html', title="Обновление и информации о пользователе", menu=menu)
def test_c_update_user(self): Users.update_user(5, birthday="1987-03-03") n = self.take_user_data() self.assertEqual(n[0][4], datetime.date(1987, 3, 3)) Users.update_user(5, firstname="Игнат") n = self.take_user_data() self.assertEqual(n[0][1], "Игнат") Users.update_user(5, lastname="Петров") n = self.take_user_data() self.assertEqual(n[0][2], "Петров") Users.update_user(5, midname="Валентинович") n = self.take_user_data() self.assertEqual(n[0][3], "Валентинович")