Skip to content

Commit d9619aa

Browse files
committed
Updated wginfo/tests.py to work with the merged wginfo/edit.py which requires the wg state to be set.
- Legacy-Id: 4938
1 parent 471cd05 commit d9619aa

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

ietf/wginfo/tests.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
from ietf.utils.test_utils import login_testing_unauthorized
4141

4242
from pyquery import PyQuery
43+
import debug
4344

4445
from ietf.utils.test_utils import SimpleUrlTestCase
4546
from ietf.doc.models import *
@@ -112,7 +113,7 @@ def test_create(self):
112113
self.assertEquals(len(Group.objects.filter(type="wg")), num_wgs)
113114

114115
# creation
115-
r = self.client.post(url, dict(acronym="testwg", name="Testing WG"))
116+
r = self.client.post(url, dict(acronym="testwg", name="Testing WG", state="proposed"))
116117
self.assertEquals(r.status_code, 302)
117118
self.assertEquals(len(Group.objects.filter(type="wg")), num_wgs + 1)
118119
group = Group.objects.get(acronym="testwg")
@@ -148,14 +149,13 @@ def test_create_based_on_existing(self):
148149
self.assertEquals(Group.objects.get(acronym=group.acronym).state_id, "bof")
149150

150151
# confirm elevation
151-
r = self.client.post(url, dict(name="Test", acronym=group.acronym, confirmed="1"))
152+
r = self.client.post(url, dict(name="Test", acronym=group.acronym, confirmed="1", state="proposed"))
152153
self.assertEquals(r.status_code, 302)
153154
self.assertEquals(Group.objects.get(acronym=group.acronym).state_id, "proposed")
154155
self.assertEquals(Group.objects.get(acronym=group.acronym).name, "Test")
155156

156157
def test_edit_info(self):
157158
make_test_data()
158-
159159
group = Group.objects.get(acronym="mars")
160160

161161
url = urlreverse('wg_edit', kwargs=dict(acronym=group.acronym))
@@ -198,6 +198,7 @@ def test_edit_info(self):
198198
acronym="mnsig",
199199
parent=area.pk,
200200
ad=ad.pk,
201+
state=group.state.pk,
201202
chairs="aread@ietf.org, ad1@ietf.org",
202203
secretaries="aread@ietf.org, ad1@ietf.org, ad2@ietf.org",
203204
techadv="aread@ietf.org",
@@ -206,6 +207,15 @@ def test_edit_info(self):
206207
list_archive="archive.mars",
207208
urls="http://mars.mars (MARS site)"
208209
))
210+
if not r.status_code == 302:
211+
for line in r.content.splitlines():
212+
label = ""
213+
if "label" in line:
214+
label = line
215+
if 'class="errorlist"' in line:
216+
debug.show('label')
217+
debug.show('line')
218+
label = ""
209219
self.assertEquals(r.status_code, 302)
210220

211221
group = Group.objects.get(acronym="mnsig")

0 commit comments

Comments
 (0)