django-testing
How to run all tests in a setup.py script?
I woul开发者_如何学Cd like to write a setup.py script that runs all of my django app\'s tests and fails the installation if one of the tests don\'t pass.[详细]
2023-03-23 22:41 分类:问答how to examine database in the middle of a Django test run?
I\'m trying to be a good programmer and use Django\'s testing facility.things are going pretty well, but I would like to be able to examine the database when I stop the program in the debugger.It look[详细]
2023-03-22 02:04 分类:问答IntegrityError when loading fixture during django testing
I\'m loading a fixture created with dumpdata, and getting the following exception: Problem installing fixture \'db_dump.json\': Traceback (most recent call last):[详细]
2023-03-14 15:24 分类:问答Running django tests with sqlite
I use Postgres for production and development, but I\'d like to use sqlite to run some tests.I don\'t see an easy way to configure one engi开发者_开发技巧ne for tests and another for dev / production.[详细]
2023-03-13 13:37 分类:问答How do I execute an arbitrary script in the context of my Django project?
Sometimes I want to execute a file in the context of my Django project, just as if I were using the shell, but with the convenience of using a text editor.This is mainly to try something out, or quick[详细]
2023-03-12 20:23 分类:问答Django test to use existing database
I\'m having a hard time customizing the test database setup behavior. I would like to achieve the following:[详细]
2023-03-11 04:01 分类:问答django object ids increment between unit tests
I\'m using Django 1.2.3-3+squeeze1 on Debian squeeze with PostgreSQL 8.4.7-0squeeze2 (though I don\'t think PostgreSQL is relevant here), and running Django unit tests based on unittest with the follo[详细]
2023-03-10 11:16 分类:问答Test specific models in Django
Is it possible to have a set of models just for testing purposes? The idea is that I\'ve written an app that contains some h开发者_开发问答elper abstract model HelperBase. Now I\'d like to provide som[详细]
2023-02-23 13:14 分类:问答Using Basic HTTP access authentication in Django testing framework
For some of my Django views I\'ve created a decorator that performs Basic HTTP access authentication.However, while writing test cases in Django, it took me a while to work out how to authenticate to[详细]
2023-02-21 03:26 分类:问答Django 1.3: Outbox empty during tests
Maybe I don\'t understand how outbox works but from the documentation I understood that it just catches all outgoing mail during testing.[详细]
2023-02-20 03:27 分类:问答