Testing and Django

Awesome video by Carl Meyer on the topic of Testing in Django. You know you’re getting there when you’re nodding your head at some of the points raised during the talk. 

Top 2 Takeways

  1. Don’t hit the db if you can avoid it. I have a lot of ORM that creates objects literally in the test database. This is slow. Use factory boy instead
  2. Check out django-webtest. A lot of my tests for the projects are essentially testing the forms within a view function.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s