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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:00:51+00:00 2026-05-23T00:00:51+00:00

I have written a small unit test for my django view .My project structure

  • 0

I have written a small unit test for my django view .My project structure is like

Project_name/

         apps/

              module1/
                      tests.py
              module2/
                      tests.py

this is my dir structure i am executing the tests by using the command :

$python manage.py test_coverage module1 module2 -v2

then it executing the test nicely but now i have change dir structure little bit i have created a new directory tests/ in that i have kept my all test files

project_name/

       apps/

            module1/
                    tests/
                         test_basic.py
                         test_detail.py

Now i can able to execute those tests which are in dir with the same above command ,is their is any alternative way to execute such tests?

  • 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-23T00:00:52+00:00Added an answer on May 23, 2026 at 12:00 am

    The simplest solution is to add __init__.py file to tests/ package containing following lines:

    from .test_basic import *
    from .test_detail import *
    

    And then run all the tests with:

    $ python manage.py test module1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some written a number of unit tests that test a wrapper around
I have written a small Perl script and now I would like to create
I have written a small test program in which I try to use the
I have never written unit tests before, for various reasons. I have a chance
I have written the small test with sole purpose to better understand transactions in
I have written a small jQuery plugin with the following structure: (function($) { //
I have written a small java application for which I need to obtain performance
I have written a small chat app that uses mysql + php to facilitate
I have written a small app that puts my bluetooth in discoverable mode for
I have written a small .net Windows Forms application. And now I decided to

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.