@@ -486,33 +486,33 @@ def test_create(self):
486486 r = self .client .post (url , dict (acronym = "foobarbaz" )) # No name
487487 self .assertEqual (r .status_code , 200 )
488488 q = PyQuery (r .content )
489- self .assertTrue (len (q ('form .has-error ' )) > 0 )
489+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
490490 self .assertEqual (len (Group .objects .filter (type = "wg" )), num_wgs )
491491
492492 # acronym contains non-alphanumeric
493493 r = self .client .post (url , dict (acronym = "test..." , name = "Testing WG" , state = bof_state .pk ))
494494 self .assertEqual (r .status_code , 200 )
495- self .assertTrue (len (q ('form .has-error ' )) > 0 )
495+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
496496
497497 # acronym contains hyphen
498498 r = self .client .post (url , dict (acronym = "test-wg" , name = "Testing WG" , state = bof_state .pk ))
499499 self .assertEqual (r .status_code , 200 )
500- self .assertTrue (len (q ('form .has-error ' )) > 0 )
500+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
501501
502502 # acronym too short
503503 r = self .client .post (url , dict (acronym = "t" , name = "Testing WG" , state = bof_state .pk ))
504504 self .assertEqual (r .status_code , 200 )
505- self .assertTrue (len (q ('form .has-error ' )) > 0 )
505+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
506506
507507 # acronym doesn't start with an alpha character
508508 r = self .client .post (url , dict (acronym = "1startwithalpha" , name = "Testing WG" , state = bof_state .pk ))
509509 self .assertEqual (r .status_code , 200 )
510- self .assertTrue (len (q ('form .has-error ' )) > 0 )
510+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
511511
512512 # no parent group given
513513 r = self .client .post (url , dict (acronym = "testwg" , name = "Testing WG" , state = bof_state .pk ))
514514 self .assertEqual (r .status_code , 200 )
515- self .assertTrue (len (q ('form .has-error ' )) > 0 )
515+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
516516
517517 # Ok creation
518518 r = self .client .post (url , dict (acronym = "testwg" , name = "Testing WG" , state = bof_state .pk , parent = area .pk ))
@@ -559,7 +559,7 @@ def test_create_based_on_existing_bof(self):
559559 r = self .client .post (url , dict (name = "Test" , acronym = group .parent .acronym ))
560560 self .assertEqual (r .status_code , 200 )
561561 q = PyQuery (r .content )
562- self .assertTrue (len (q ('form .has-error ' )) > 0 )
562+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
563563
564564 # try elevating BOF to WG
565565 group .state_id = "bof"
@@ -568,7 +568,7 @@ def test_create_based_on_existing_bof(self):
568568 r = self .client .post (url , dict (name = "Test" , acronym = group .acronym ))
569569 self .assertEqual (r .status_code , 200 )
570570 q = PyQuery (r .content )
571- self .assertTrue (len (q ('form .has-error ' )) > 0 )
571+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
572572
573573 self .assertEqual (Group .objects .get (acronym = group .acronym ).state_id , "bof" )
574574
@@ -602,7 +602,7 @@ def test_edit_info(self):
602602 r = self .client .post (url , dict (acronym = "collide" ))
603603 self .assertEqual (r .status_code , 200 )
604604 q = PyQuery (r .content )
605- self .assertTrue (len (q ('form .has-error ' )) > 0 )
605+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
606606
607607 # create old acronym
608608 group .acronym = "oldmars"
@@ -615,7 +615,7 @@ def test_edit_info(self):
615615 r = self .client .post (url , dict (acronym = "oldmars" ))
616616 self .assertEqual (r .status_code , 200 )
617617 q = PyQuery (r .content )
618- self .assertTrue (len (q ('form .has-error ' )) > 0 )
618+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
619619
620620 # edit info
621621 with (Path (settings .CHARTER_PATH ) / ("%s-%s.txt" % (group .charter .canonical_name (), group .charter .rev ))).open ("w" ) as f :
@@ -860,7 +860,7 @@ def test_conclude(self):
860860 r = self .client .post (url , dict (instructions = "" )) # No instructions
861861 self .assertEqual (r .status_code , 200 )
862862 q = PyQuery (r .content )
863- self .assertTrue (len (q ('form .has-error ' )) > 0 )
863+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
864864
865865 # request conclusion
866866 mailbox_before = len (outbox )
@@ -1115,7 +1115,7 @@ def test_add_milestone(self):
11151115 })
11161116 self .assertEqual (r .status_code , 200 )
11171117 q = PyQuery (r .content )
1118- self .assertTrue (len (q ('form .has-error ' )) > 0 )
1118+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
11191119 self .assertEqual (GroupMilestone .objects .count (), milestones_before )
11201120
11211121 # add
@@ -1263,7 +1263,7 @@ def test_edit_milestone(self):
12631263 })
12641264 self .assertEqual (r .status_code , 200 )
12651265 q = PyQuery (r .content )
1266- self .assertTrue (len (q ('form .has-error ' )) > 0 )
1266+ self .assertTrue (len (q ('form .is-invalid ' )) > 0 )
12671267 m = GroupMilestone .objects .get (pk = m1 .pk )
12681268 self .assertEqual (GroupMilestone .objects .count (), milestones_before )
12691269 self .assertEqual (m .due , m1 .due )
0 commit comments