mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 02:49:21 +02:00
refactored DomainAdmin response_change into multiple methods; updated create_user in common.py for properly setting is_staff for test users; added tearDown for TestDomainAdmin
This commit is contained in:
parent
744c6fa48a
commit
5c41e4a28f
3 changed files with 42 additions and 30 deletions
|
@ -41,6 +41,7 @@ class TestDomainAdmin(TestCase):
|
|||
self.factory = RequestFactory()
|
||||
self.admin = DomainAdmin(model=Domain, admin_site=self.site)
|
||||
self.client = Client(HTTP_HOST="localhost:8080")
|
||||
self.superuser = create_superuser()
|
||||
self.staffuser = create_user()
|
||||
|
||||
def test_place_and_remove_hold(self):
|
||||
|
@ -80,6 +81,10 @@ class TestDomainAdmin(TestCase):
|
|||
self.assertContains(response, "Place hold")
|
||||
self.assertNotContains(response, "Remove hold")
|
||||
|
||||
def tearDown(self):
|
||||
Domain.objects.all().delete()
|
||||
User.objects.all().delete()
|
||||
|
||||
|
||||
class TestDomainApplicationAdmin(TestCase):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue