I had been trying to add tests to a project I'm working on.
The tests are in forum/tests/
When I run manage.py test it doesn't find any of the tests I created, on the tests in Django 1.2
I started with all my tests in their own package but have simplified down to just being in my tests.py file. The current tests.py looks like:
from django.test.client import Client
from django.test import TestCase
from utils import *
from forum.models import *
from forum import auth
class ForumTestCase(TestCase):
def test_root_page(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
def test_signin_page(self):
response = self.client.get("/account/signin/")
self.assertEqual(response.status_code, 200)
I'm sure I am missing something very basic and obvious but I just can't work out what. Any ideas?
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.humanize',
'forum',
'django_authopenid',
)
Why would Django testrunner not be finding the tests I created?
The tests are at forum/tests/:
__init__.py
forum/tests/test_views.py
forum/tests/test_models.py
I also have a __init__.py
file in the directory.