@pytest.mark.django_db
def test_admin_access(client):
 client.login(username='admin', password='admin')
 response = client.get(ADMIN_URL)
 assert (response.status_code == 200)

@ pytest . mark . django_db def test_admin_access ( client ) : client . login ( username = 'admin' , password = 'admin' ) response = client . get ( ADMIN_URL ) assert ( response . status_code == 200 )
tests that admin users can access the admin site .