We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@app.post( "/tarefas", response_model=TarefaResponse, status_code=status.HTTP_201_CREATED ) def criar(tarefa: TarefaBase): nova_tarefa = tarefa.dict() nova_tarefa.update({"id": uuid4()}) response = TarefaResponse(**nova_tarefa) TAREFAS.append(nova_tarefa) if len(TAREFAS) > 10: TarefasList.pop() return response ## def test_quando_criar_deve_persistir_ate_10(self): tarefa = {"titulo": "titulo", "descricao": "descricao"} i = 0 while i < 15: self.cliente.post("/tarefas", json=tarefa) i += 1 numero_tarefas = len(TarefasList) assert numero_tarefas == 10 TarefasList.clear()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: