django-testing
Django -- messing with the test server -- 304 errors and such
While working on my webapp (which requires a login for the entire site) I noticed a funny "glitch" (if you can call it that). I was viewing my Django site, logged into the site (on the test[详细]
2023-04-12 07:17 分类:问答In Django, why do I need to add the site name to imports in tests.py?
I\'ve put some unit tests in mysite/vncbrowser/tests.py, and I can run these with: cd mysite python manage.py test vncbrowser[详细]
2023-04-06 06:48 分类:问答Posting a form back with it's default values in the Django TestClient
I\'m writing some tests for some forms in Django. These forms change quite often so I\'m trying to avoid hard-coding the form parameters into my tests as because every time my form would change, I\'d[详细]
2023-04-05 21:46 分类:问答Django testing with assertRaises fails to realise that exception raised is the one expected
I have the following test code snippet with self.assertRaises(models.NotEnoughInventorySpace): self.inv2.add_item(self.item2, 1)[详细]
2023-04-03 22:38 分类:问答GET Formset returns 302 instead of 200 (django) [closed]
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic[详细]
2023-04-02 15:26 分类:问答What kind of tests should one write in Django
Let\'s says I have a Djano app. Users can sign up, get a activation mail, activate their accounts and log in. After logging in, users can can create, update and delete objects rhough a custom Form whi[详细]
2023-04-02 15:11 分类:问答Problem with django tests
I have simple app in my project. This app works without any problem. I want to test it so I created some tests for it. But when i want to run test for it I receive App with label \'x\' could not be fo[详细]
2023-03-28 15:30 分类:问答Transaction / RawSequel - And the joys of testing
Both of these work in \"production\"The later only works in testing.Now that I\'ve gotten something to work in both production and testing I\'d like to understand why I had to go the whole cursors rou[详细]
2023-03-27 07:44 分类:问答Using Django Test to Analyse and Repair Data of a Database
I had an idea and before implementing I would like to throw it out there to get some feedback or even discover that somebody has already done.[详细]
2023-03-25 18:02 分类:问答Detect django testing mode
I\'m开发者_C百科 writing a reusable django app and I need to ensure that its models are only sync\'ed when the app is in test mode. I\'ve tried to use a custom DjangoTestRunner, but I found no example[详细]
2023-03-25 08:46 分类:问答