fixed tests and linter

This commit is contained in:
Alysia Broddrick 2023-09-12 21:48:27 -07:00
parent 4292c38b47
commit 29b8c72911
No known key found for this signature in database
GPG key ID: 03917052CD0F06B7
8 changed files with 168 additions and 154 deletions

View file

@ -24,6 +24,7 @@ from .common import (
create_user,
create_ready_domain,
multiple_unalphabetical_domain_objects,
MockEppLib,
)
from django.contrib.sessions.backends.db import SessionStore
from django.contrib.auth import get_user_model
@ -38,17 +39,17 @@ import logging
logger = logging.getLogger(__name__)
class TestDomainAdmin(TestCase):
class TestDomainAdmin(MockEppLib):
def setUp(self):
self.site = AdminSite()
self.admin = DomainAdmin(model=Domain, admin_site=self.site)
self.client = Client(HTTP_HOST="localhost:8080")
self.superuser = create_superuser()
self.staffuser = create_user()
super().setUp()
def test_place_and_remove_hold(self):
domain = create_ready_domain()
# get admin page and assert Place Hold button
p = "userpass"
self.client.login(username="staffuser", password=p)
@ -88,8 +89,11 @@ class TestDomainAdmin(TestCase):
raise
def tearDown(self):
Domain.objects.all().delete()
# DomainInformation.objects.all().delete()
# DomainApplication.objects.all().delete()
# Domain.objects.all().delete()
User.objects.all().delete()
super().tearDown()
class TestDomainApplicationAdmin(TestCase):