Skip to content

Commit 460f131

Browse files
committed
Fix problem in test of editing status change relations
- Legacy-Id: 8587
1 parent 3b239fa commit 460f131

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

ietf/doc/tests_status_change.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -347,40 +347,36 @@ def test_edit_relations(self):
347347
q = PyQuery(r.content)
348348
self.assertEqual(len(q('.content-wrapper [type=submit]:contains("Save")')),1)
349349
# There should be three rows on the form
350-
self.assertEqual(len(q('tr[id^=relation_row]')),3)
350+
self.assertEqual(len(q('.content-wrapper .row')),3)
351351

352352
# Try to add a relation to an RFC that doesn't exist
353353
r = self.client.post(url,dict(new_relation_row_blah="rfc9997",
354-
statchg_relation_row_blah="tois",
355-
Submit="Submit"))
354+
statchg_relation_row_blah="tois"))
356355
self.assertEqual(r.status_code, 200)
357356
q = PyQuery(r.content)
358-
self.assertTrue(len(q('form .has-error')) > 0)
357+
self.assertTrue(len(q('form ul.errorlist')) > 0)
359358

360359
# Try to add a relation leaving the relation type blank
361360
r = self.client.post(url,dict(new_relation_row_blah="rfc9999",
362-
statchg_relation_row_blah="",
363-
Submit="Submit"))
361+
statchg_relation_row_blah=""))
364362
self.assertEqual(r.status_code, 200)
365363
q = PyQuery(r.content)
366-
self.assertTrue(len(q('form .has-error')) > 0)
364+
self.assertTrue(len(q('form ul.errorlist')) > 0)
367365

368366
# Try to add a relation with an unknown relationship type
369367
r = self.client.post(url,dict(new_relation_row_blah="rfc9999",
370-
statchg_relation_row_blah="badslug",
371-
Submit="Submit"))
368+
statchg_relation_row_blah="badslug"))
372369
self.assertEqual(r.status_code, 200)
373370
q = PyQuery(r.content)
374-
self.assertTrue(len(q('form .has-error')) > 0)
371+
self.assertTrue(len(q('form ul.errorlist')) > 0)
375372

376373
# Successful change of relations
377374
r = self.client.post(url,dict(new_relation_row_blah="rfc9999",
378375
statchg_relation_row_blah="toexp",
379376
new_relation_row_foo="rfc9998",
380377
statchg_relation_row_foo="tobcp",
381378
new_relation_row_nob="rfc14",
382-
statchg_relation_row_nob="tohist",
383-
Submit="Submit"))
379+
statchg_relation_row_nob="tohist"))
384380
self.assertEqual(r.status_code, 302)
385381
doc = Document.objects.get(name='status-change-imaginary-mid-review')
386382
self.assertEqual(doc.relateddocument_set.count(),3)

0 commit comments

Comments
 (0)