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 8527185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:29:05+00:00 2026-06-11T08:29:05+00:00

I have a weird problem at hand. I’m creating a django package and would

  • 0

I have a weird problem at hand.

I’m creating a django package and would like to provide some test cases for it.

The package is named ajax_forms and the full path is part of my PYTHONPATH.
This directory also contains a tests directory (with the __init__.py file) a tests.py file (containing the tests) and a urls.py file.

Now I want to run the tests.

The ajax_forms parent directory has an example project setup with ajax_forms in INSTALLED_APPS.

But I can’t seem to let the tests run:

 >> ./manage.py test ajax_forms
Creating test database for alias 'default'...

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
Destroying test database for alias 'default'...

No tests are found so I try to be more specific:

 >> ./manage.py test ajax_forms.tests
....
raise ValueError("Test label '%s' does not refer to a test" % label)
ValueError: Test label 'ajax_forms.tests' does not refer to a test
(ajax-validation)

Even ./manage.py ajax_forms.tests.tests.AjaxFormViewTest will not find the tests and gives the same error as above.

But trying to import the test case from the ./manage.py shell works fine

In [2]: from ajax_forms.tests.tests import AjaxFormViewTest

I’m kinda clueless here, on what’s going on.

  • 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-06-11T08:29:06+00:00Added an answer on June 11, 2026 at 8:29 am

    You need to put from tests import * in your __init__.py file

    Django will look in your app for a package/module called tests, and then interrogate its namespace for test cases. In this case it will look at the namespace of your tests package (from the init.py file), and discover nothing there. By doing the import in the __init__.py file then you will import the testcases from your tests module into the namespace of the tests package, and django will be able to locate them and run them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a weird problem. i would like to delete an assembly(plugin.dll on harddisk)
I have a weird problem and I would like if someone can enlighten me
I have a weird problem, so I thought I would ask and see if
I have a weird problem on my hand. I am trying to read an
I have a weird problem with $_GET method. I have a php code like
I have some weird problem with templates. When trying to pass a parameterised iterator
I have weird problem with this code: if I run it like shown below
I have weird problem with django translations that i need help figuring out. Problem
I have a weird problem with a Java Gregorian Calendar: SimpleDateFormat sdf = new
I have a weird problem. When I execute a query the data is not

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.