def read_user_from_request_body(req) -> User: body = json.loads(req.body()) user = User() user.id = None user.login = body["login"] user.password = body["password"] return user
def fill_users(users: Users): u1 = User('PizzaOwner', 'lovepizza1') u2 = User('PubOwner', 'lovepub1') u3 = User('SushiOwner', 'lovesushi1') u4 = User('VasyaPupkin', 'lovepupok1') u5 = User('PanAleha', 'loveAleha1') u6 = User('LesyaSuper', 'loveLesya1') u7 = User('MrMops', 'loveMops1') users.put(u1) users.put(u2) users.put(u3) users.put(u4) users.put(u5) users.put(u6) users.put(u7)