def test_event_user_unfollow(self): user = factory(User).create(status=User.statuses['active']) self.__run_bot('user/unfollow', { 'id': user.id, }) user_to_check = User.find(user.id) self.assertEqual(user_to_check.status, User.statuses['not_active'])
async def get_users_api(_: User = Depends(get_current_user)): cursor = User.find() return [user.dump() for user in await cursor.to_list(length=10)]