Coder Social home page Coder Social logo

guide-to-testing-in-django's Introduction

Guide to Testing in Django

This is the example project demonstrating how to go about testing from the blog series on the topic. It adds tests to the perennial "polls" app from the Django tutorial (minus the generic views).

Tags have been added for each step in the process, starting with 01-initial. The project is based on Django 1.3 & SQLite.

For the admin:

  • Username: admin
  • Password: abc123

guide-to-testing-in-django's People

Contributors

bernardobarreto avatar flavianmissi avatar toastdriven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

guide-to-testing-in-django's Issues

Test with ManyToManyField

It would be interesting to create tests in model layer, using fixtures in the case of models containing fields of type ManyToManyField.

Git clone creates an uncompatible directory name

Hay and thanks for the tutorial at http://toastdriven.com/blog/2011/apr/10/guide-to-testing-in-django/ !

My reading experience was stopped by following error at tag 02-first-test:
python manage.py test polls
...
ImportError: No module named guide_to_testing.urls

The command "git clone https://github.com/toastdriven/guide-to-testing-in-django.git" created a directory named guide-to-testing-in-django. After renaming the directory to guide_to_testing, the "python manage.py test polls" worked like expected.

Maybe there is a fix for this? I'm on Ubuntu 10.10 64-bit, running Python 2.6.6, Django 1.3 and Git 1.7.1.

And one other thing being related to the tutorial... My current Git doesn't know command "git co 02-first-test". Only "git checkout 02-first-test" works. Since my git version is default version in Ubuntu repositories, this little problem may affect other people too.

Django 1.6 compatible

execute_manager is deprecated in Django 1.4 and removed in Django 1.6. Hence I'll get this exception in Django 1.6+

Traceback (most recent call last):
  File "./manage.py", line 2, in <module>
    from django.core.management import execute_manager
ImportError: cannot import name execute_manager

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.