test: fix tests broken in recent commits (#4685)

* chore: remove unused import in timezone.py

* test: fix test_view_request, broken by recent work
This commit is contained in:
Jennifer Richards 2022-11-01 16:30:42 -03:00 committed by GitHub
parent 3008c4904e
commit 91635de968
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -834,8 +834,14 @@ class LockAppTestCase(TestCase):
r = self.client.get(url,follow=True)
self.assertEqual(r.status_code, 200)
q = PyQuery(r.content)
self.assertEqual(len(q(':disabled[name="edit"]')), 1)
self.assertEqual(len(q(':enabled[name="edit"]')), 1) # secretary can edit
chair = self.group.role_set.filter(name_id='chair').first().person.user.username
self.client.login(username=chair, password=f'{chair}+password')
r = self.client.get(url,follow=True)
self.assertEqual(r.status_code, 200)
q = PyQuery(r.content)
self.assertEqual(len(q(':disabled[name="edit"]')), 1) # chair cannot edit
def test_new_request(self):
url = reverse('ietf.secr.sreq.views.new',kwargs={'acronym':self.group.acronym})

View file

@ -1,6 +1,5 @@
import datetime
import random
import zoneinfo
from typing import Union
from zoneinfo import available_timezones, ZoneInfo