Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 802535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:37:09+00:00 2026-05-14T23:37:09+00:00

I had been trying to add tests to a project I’m working on. The

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:37:10+00:00Added an answer on May 14, 2026 at 11:37 pm

    As noted in the comment, Django 1.6 introduced backwards-incompatibility with discovery of tests in any test module.

    Before Django 1.6, one would have to do the following:

    Create file named __init__.py in

    forum/tests/__init__.py
    

    And import all test from other moduls inside it.

    from test_views import SomeTestCase
    from test_models import SomeOtherTestCase
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've had been hearing about test driven development for a couple years now, and
I have a new ASP.NET MVC project (my first), and I had been running
This might sound silly but I have been trying to execute a NUnit test
Actually i had been practicing some of the java programs today(trying to learn it
I have been trying to find a collision avoidance example that I can adapt
I had been happily coding along on a decent sized solution (just over 13k
I had been steering away from C# for a while, because it was just
I had been wondering for quite some time on how to manager memory in
Our Dev team had been developing enterprise web page more than 2 years ago.
The ability to use BitKeeper free of charge had been withdrawn by the copyright

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.