split django app tests in several files

后端 未结 1 456
攒了一身酷
攒了一身酷 2021-01-06 18:11

I\'m working on a django 1.2 app and I\'m a kind of beginner with the framework, I want to split my tests in several files for the app https://github.com/vkhemlan/BolsaTraba

相关标签:
1条回答
  • 2021-01-06 19:00

    Here's a really good guide on testing django apps: A Guide to Testing in Django

    And the example app on github splits the tests for forms, views and models into separate files, so it is probably a good example for you.

    Note how each test module gets imported in __init__.py:

    from polls.tests.forms import *
    from polls.tests.models import *
    from polls.tests.views import *
    
    0 讨论(0)
提交回复
热议问题