Pages
Categories
Category Archives: Tech
Unit Tests in Django
I’m going to talk a bit about some of the practices that I use for unit testing in Django. If you’re unfamiliar with the Django testing system, you can read up on it here: http://docs.djangoproject.com/en/dev/topics/testing/ In general, I organize my unit tests into folders (ref. Organizing Django Tests into Folders) so I can break them [...]
Organizing Django Tests into Folders
Update: Due to some strange Django error, Django will refuse to run your app’s tests if your application doesn’t have a models.py file. You’ll need to create an empty models.pyin your app’s folder if you don’t have one Django comes with a nice testing rig that lets you individually test each app. By using a [...]
Django Unit Test Failure in auth Package
We’ve been using the django.contrib.auth app to handle all of our user login/logout/registration/etc. needs, and it has worked great for us so far. However, when we tried to run the unit tests for our project we found 10 or so errors with regards to the auth package itself. At first, I thought it was because [...]
Confirm Password Change
I was working with Django’s view.password_change today when I encountered the dialog box above. As far as I could tell all of my information was being passed to Django correctly; but for reasons unknown to me I was still getting this “Confirm Password Change” message. After a bit of Googling, I found out that this [...]
Django Models and Templates