Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Segue a solicitacao para realizar o pull request. Este commit que eu fiz foi para fechar a issue#5.
Na pratica eu fiz muito mais que a issue#5, aproveitei para estruturar melhor o codigo e comecei algumas views por exemplo a do carroceiro que esta relacionado a issue#1.
Na sequencia eu gostaria de conversar com voces sobre a issue#1, porque por exemplo, quando eu estava fazendo o modelo eu fiquei em duvida se o "phone" poderia ser UNIQUE, mas eu vi que na nossa database.sql um mesmo catador tinha dois enderecos, entao eu imagino que ele poderia ter o endereco da casa e o "atual do GPS (isto eh se no futuro existir o GPS para o carrinho)". Com base nisso (considerando as restricoes e o que poderia ou nao poderia, por exemplo nome null etc..
), eu fiz uma classe inteira para executar os testes de integracao (ja que nao temos a APIClient/consumer eu utilizer o requests do python para simular um client) e todos estes passaram (ou seja a view que eu fiz esta checkando todos as exceptions e etc e esta funcionando 100%):
(venv)arcanjo@ubuntu:~/PycharmProjects/pimpapp-api$ py.test integration_tests/tests.py
=========================================================================================== test session starts ===========================================================================================
platform linux -- Python 3.4.3+, pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: /home/arcanjo/PycharmProjects/pimpapp-api/integration_tests, inifile:
collected 10 items
integration_tests/tests.py ..........
======================================================================================== 10 passed in 0.74 seconds ========================================================================================
(venv)arcanjo@ubuntu:~/PycharmProjects/pimpapp-api$
Segue em anexo algumas screenshots tambem, para voces ver que o JSON ja esta sendo recuperado