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.

1220 questions
-1
votes
2 answers

How to initialize test database in django?

I am writing a test cases for my project written in django, it's giving an unexpected output that looks like {u'message': u'', u'result': {u'username': u'john', u'user_fname': u'', u'user_lname': u'', u'cur_time': 1442808291000.0, u'dofb': None,…
geeks
  • 2,025
  • 6
  • 31
  • 49
-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
  • 2,400
  • 6
  • 35
  • 66
-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
  • 164
  • 3
  • 18
-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
81
82