@@ -43,12 +43,6 @@ def test_start_review(self):
4343
4444 # faulty posts
4545
46- ## Must set a responsible AD
47- r = self .client .post (url ,dict (document_name = "bogus" ,title = "Bogus Title" ,ad = "" ,create_in_state = state_strpk ,notify = 'ipu@ietf.org' ))
48- self .assertEqual (r .status_code , 200 )
49- q = PyQuery (r .content )
50- self .assertTrue (len (q ('form .is-invalid' )) > 0 )
51-
5246 ## Must set a name
5347 r = self .client .post (url ,dict (document_name = "" ,title = "Bogus Title" ,ad = ad_strpk ,create_in_state = state_strpk ,notify = 'ipu@ietf.org' ))
5448 self .assertEqual (r .status_code , 200 )
@@ -67,10 +61,13 @@ def test_start_review(self):
6761 q = PyQuery (r .content )
6862 self .assertTrue (len (q ('form .is-invalid' )) > 0 )
6963
70- # successful status change start
71- r = self .client .post (url ,dict (document_name = "imaginary-new" ,title = "A new imaginary status change" ,ad = ad_strpk ,
72- create_in_state = state_strpk ,notify = 'ipu@ietf.org' ,new_relation_row_blah = "rfc9999" ,
73- statchg_relation_row_blah = "tois" ))
64+ # successful status change starts
65+
66+ r = self .client .post (url ,dict (
67+ document_name = "imaginary-new" ,title = "A new imaginary status change" ,ad = ad_strpk ,
68+ create_in_state = state_strpk ,notify = 'ipu@ietf.org' ,new_relation_row_blah = "rfc9999" ,
69+ statchg_relation_row_blah = "tois" )
70+ )
7471 self .assertEqual (r .status_code , 302 )
7572 status_change = Document .objects .get (name = 'status-change-imaginary-new' )
7673 self .assertEqual (status_change .get_state ('statchg' ).slug ,'adrev' )
@@ -79,6 +76,17 @@ def test_start_review(self):
7976 self .assertEqual (status_change .notify ,'ipu@ietf.org' )
8077 self .assertTrue (status_change .relateddocument_set .filter (relationship__slug = 'tois' ,target__docs__name = 'draft-ietf-random-thing' ))
8178
79+ # Verify that it's possible to start a status change without a responsible ad.
80+ r = self .client .post (url ,dict (
81+ document_name = "imaginary-new2" ,title = "A new imaginary status change" ,
82+ create_in_state = state_strpk ,notify = 'ipu@ietf.org' ,new_relation_row_blah = "rfc9999" ,
83+ statchg_relation_row_blah = "tois" )
84+ )
85+ self .assertEqual (r .status_code , 302 )
86+ status_change = Document .objects .get (name = 'status-change-imaginary-new2' )
87+ self .assertIsNone (status_change .ad )
88+
89+
8290 def test_change_state (self ):
8391
8492 doc = Document .objects .get (name = 'status-change-imaginary-mid-review' )
@@ -534,4 +542,4 @@ def test_subsequent_submission(self):
534542
535543 def setUp (self ):
536544 super ().setUp ()
537- DocumentFactory (type_id = 'statchg' ,name = 'status-change-imaginary-mid-review' ,notify = 'notify@example.org' )
545+ DocumentFactory (type_id = 'statchg' ,name = 'status-change-imaginary-mid-review' ,notify = 'notify@example.org' )
0 commit comments