I tried to add tests to the project I'm working on.
Tests on the forum / tests /
When I run the manage.py test, it does not find any of the tests I created on the tests in Django 1.2
I started with all my tests in my own package, but simplified to just finding myself in the tests.py file. The current test.py looks like this:
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 am sure that I am missing something very simple and obvious, but I just canβt understand that. 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 won't Django testrunner look for the tests I created?
Tests on the forum / tests /:
__init__.py
forum/tests/test_views.py
forum/tests/test_models.py
I also have a file __init__.pyin the directory.
source
share