Complete the code to import the Django test client.
from django.test import [1]
The Client class lets you simulate user requests in tests.
Complete the code to define a test case class inheriting from Django's test case.
class MyTest([1]): pass
Test classes should inherit from TestCase to get testing features.
Fix the error in the test method name to make it run automatically.
def [1](self): self.assertEqual(1 + 1, 2)
Test methods must start with test_ to be discovered by Django.
Fill both blanks to create a test that checks the home page status code.
def test_home_page(self): response = self.client.[1]('/') self.assertEqual(response.[2], 200)
Use get to request the home page and check status_code for 200 OK.
Fill all three blanks to write a test that creates a user and checks its username.
def test_create_user(self): user = User.objects.[1](username='alice') self.assertEqual(user.[2], 'alice') self.assertTrue(user.[3]())
Create a user with create, check the username, and verify the user is active.
