Questions tagged [django-testing]

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. This tag is about writing and running tests for your Django apps.

Django

Testing overview

Testing a Web application is a complex task, because a Web application is made of several layers of logic – from HTTP-level request handling, to form validation and processing, to template rendering. With Django’s test-execution framework and assorted utilities, you can simulate requests, insert test data, inspect your application’s output and generally verify your code is doing what it should be doing.

1023 questions
-1
votes
1 answer

Testing URLs - URLs that don't exist return 200

I have a function to test my URLs which looks like this: def test_URLs(self): routes = [ 'about/', 'archive/', 'index/', 'admin/', '' 'doesntExist/' ] for route in routes: response =…
Nanor
  • 1,871
  • 4
  • 27
  • 50
-2
votes
3 answers

django test / python syntax

I'm new Django and also to modern web-development . i had a doubt the testing of app. The confusion may be because of my less python knowledge . I was a Java programmer so i got a doubt with the code below. Here's my code: def…
Warlock
  • 154
  • 3
  • 17
-4
votes
1 answer

Django: import error in test

I have a new project in django, without any test. I think that it should say that all is ok, because there are not tests when I try python manage.py test. Instead of that, I obtained this exit: shell screen Any one know why?
1 2 3
68
69