Is it possible to create hidden service with django?

Is there a best practice for where tests should live in a Django project?

  • I am setting up a new project with Django - my first time.  I have done much research on how to structure the project hierarchy and looked as several Django projects in github.  I have come up with this structure (abbreviated) project |--api    - apis go here - these are lower level apis to services     |--search  - search api     |--nlp  - nlp service api |--apps   - Django apps go here     |--app1     ... |--handlers - business layer apis - these can be called by apps |--templates http://fabfile.py http://wsgi.py http://settings.py ... Where should tests go?  I want to have unit tests and integration tests separate.  Should I create a test dir at the project level and follow the same source hierarchy... project ... |---test       |---unit           |---api              |---serach                  |http://---sometest.py              |---nlp           |---apps              |---app1                 |http://---sometest.py           |---handlers                 |http://---sometest.py      |---integration          |---api              |---search                   |http://---someinttest.py   etc. or should they live with the source... project     api        search            http://somesrc.py            test                unit                    http://sometest.py                integration                    http://someinttest.py etc. or is some other organization better?

  • Answer:

    Put your tests in a tests directory within each app app/app1/tests/http://__init__.py app/app1/tests/http://test_cases_one.py app/app1/tests/http://test_cases_two.py if you want to group them all together, I recommend using a product like nose: http://nose.readthedocs.org/en/latest/

Joseph Misiti at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.