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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:10:10+00:00 2026-06-13T23:10:10+00:00

My understanding from reading the docs runs something like this: client is a subclass

  • 0

My understanding from reading the docs runs something like this:

  1. client is a subclass of TestCase. When we run manage.py test, an instance of our SimpleTest class (which inherits from TestCase) is created for each method that starts ‘test_’. This is self.
  2. Client is a subclass of client. We can create new Client instances and sometimes it’s helpful to do so.
  3. Yet somehow, when we type self.client, what we are referring to is a particular Client that was instantiated when the TestCase was created, and not the client class one layer below TestCase.

Is this correct? If so, how is this the case – something to do with Superclasses?

  • 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-13T23:10:11+00:00Added an answer on June 13, 2026 at 11:10 pm

    If i’m understanding both your question and the documentation correctly. The client property is provided as a convenience it makes sense that each test has access to a from django.test.client import Client Client instance.

    Your first question:

    1. client is a subclass of TestCase. When we run manage.py test, an instance of our SimpleTest class (which inherits from TestCase) is created for each method that starts ‘test_’. This is self.

    from the source It doesn’t look like Client is a subclass of TestCase at all.

    class Client(RequestFactory):
        """
        A class that can act as a client for testing purposes.
    

    From the source I don’t see where? the Client class is being instantiated and attached to TestCase instance but it is somewhere.

    Django is completely open source so given some free time it is easy to track down how things and where things are happening. https://github.com/django/django Following the import paths and grepping around can find all answers

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

Sidebar

Related Questions

From my understanding of the docs this general approach should work: begin try1 rescue
It's my understanding that if two threads are reading from the same piece of
From my understanding by reading several articles I assumed Process Address Space(PAS) and Virtual
From my understanding of the manual for DECIMAL in the mysql docs, it states
I was reading the following article: http://java.sun.com/docs/hotspot/gc1.4.2/example.html and have trouble understanding the following lines:
My understanding from reading the specification ( http://www.ietf.org/rfc/rfc2445.txt ) is that the : character
I bet that I could find the answer of this question from reading similar
I have been reading through, testing, and coming up short from understanding how to
I have some not understanding actions from gnu clisp Suppose, I have some code
From my understanding, the soft keyboard is actually a dialog window that underlies all

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.