4040from ietf .utils .test_utils import login_testing_unauthorized
4141
4242from pyquery import PyQuery
43+ import debug
4344
4445from ietf .utils .test_utils import SimpleUrlTestCase
4546from 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