mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-28 16:29:54 +02:00
fixed tests and linter
This commit is contained in:
parent
4292c38b47
commit
29b8c72911
8 changed files with 168 additions and 154 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue