1515from django .urls import reverse as urlreverse
1616
1717from ietf .doc .factories import DocumentFactory , IndividualRfcFactory , WgRfcFactory
18- from ietf .doc .models import ( Document , DocAlias , State , DocEvent ,
18+ from ietf .doc .models import ( Document , State , DocEvent ,
1919 BallotPositionDocEvent , NewRevisionDocEvent , TelechatDocEvent , WriteupDocEvent )
2020from ietf .doc .utils import create_ballot_if_not_open
2121from ietf .doc .views_status_change import default_approval_text
@@ -74,7 +74,7 @@ def test_start_review(self):
7474 self .assertEqual (status_change .rev ,'00' )
7575 self .assertEqual (status_change .ad .name ,'Areað Irector' )
7676 self .assertEqual (status_change .notify ,'ipu@ietf.org' )
77- self .assertTrue (status_change .relateddocument_set .filter (relationship__slug = 'tois' ,target__name = 'draft-ietf-random-thing ' ))
77+ self .assertTrue (status_change .relateddocument_set .filter (relationship__slug = 'tois' ,target__name = 'rfc9999 ' ))
7878
7979 # Verify that it's possible to start a status change without a responsible ad.
8080 r = self .client .post (url ,dict (
@@ -159,8 +159,8 @@ def test_edit_notices(self):
159159 self .assertTrue (doc .latest_event (DocEvent ,type = "added_comment" ).desc .startswith ('Notification list changed' ))
160160
161161 # Some additional setup so there's something to put in a generated notify list
162- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc9999' ),relationship_id = 'tois' )
163- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc9998' ),relationship_id = 'tohist' )
162+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc9999' ),relationship_id = 'tois' )
163+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc9998' ),relationship_id = 'tohist' )
164164
165165 # Ask the form to regenerate the list
166166 r = self .client .post (url ,dict (regenerate_addresses = "1" ))
@@ -263,8 +263,8 @@ def test_edit_lc(self):
263263 login_testing_unauthorized (self , "ad" , url )
264264
265265 # additional setup
266- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc9999' ),relationship_id = 'tois' )
267- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc9998' ),relationship_id = 'tohist' )
266+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc9999' ),relationship_id = 'tois' )
267+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc9998' ),relationship_id = 'tohist' )
268268 doc .ad = Person .objects .get (name = 'Ad No2' )
269269 doc .save_with_history ([DocEvent .objects .create (doc = doc , rev = doc .rev , type = "changed_document" , by = Person .objects .get (user__username = "secretary" ), desc = "Test" )])
270270
@@ -307,8 +307,8 @@ def test_approve(self):
307307 login_testing_unauthorized (self , "secretary" , url )
308308
309309 # Some additional setup
310- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc9999' ),relationship_id = 'tois' )
311- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc9998' ),relationship_id = 'tohist' )
310+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc9999' ),relationship_id = 'tois' )
311+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc9998' ),relationship_id = 'tohist' )
312312 create_ballot_if_not_open (None , doc , Person .objects .get (user__username = "secretary" ), "statchg" )
313313 doc .set_state (State .objects .get (slug = 'appr-pend' ,type = 'statchg' ))
314314
@@ -348,10 +348,10 @@ def approval_pend_notice_test_helper(self, role):
348348 url = urlreverse ('ietf.doc.views_status_change.change_state' ,kwargs = dict (name = doc .name ))
349349
350350 # Add some status change related documents
351- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc9999' ),relationship_id = 'tois' )
352- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc9998' ),relationship_id = 'tohist' )
351+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc9999' ),relationship_id = 'tois' )
352+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc9998' ),relationship_id = 'tohist' )
353353 # And a non-status change related document
354- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc14' ),relationship_id = 'updates' )
354+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc14' ),relationship_id = 'updates' )
355355
356356 login_testing_unauthorized (self , role , url )
357357 empty_outbox ()
@@ -373,9 +373,9 @@ def approval_pend_notice_test_helper(self, role):
373373 self .assertTrue (notification ['Subject' ].startswith ('Approved:' ))
374374 notification_text = get_payload_text (notification )
375375 self .assertIn ('The AD has approved changing the status' , notification_text )
376- self .assertIn (DocAlias .objects .get (name = 'rfc9999' ). document .canonical_name (), notification_text )
377- self .assertIn (DocAlias .objects .get (name = 'rfc9998' ). document .canonical_name (), notification_text )
378- self .assertNotIn (DocAlias .objects .get (name = 'rfc14' ). document .canonical_name (), notification_text )
376+ self .assertIn (Document .objects .get (name = 'rfc9999' ).canonical_name (), notification_text )
377+ self .assertIn (Document .objects .get (name = 'rfc9998' ).canonical_name (), notification_text )
378+ self .assertNotIn (Document .objects .get (name = 'rfc14' ).canonical_name (), notification_text )
379379 self .assertNotIn ('No value found for' , notification_text ) # make sure all interpolation values were set
380380 else :
381381 self .assertEqual (len (outbox ), 0 )
@@ -395,8 +395,8 @@ def test_edit_relations(self):
395395 login_testing_unauthorized (self , "secretary" , url )
396396
397397 # Some additional setup
398- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc9999' ),relationship_id = 'tois' )
399- doc .relateddocument_set .create (target = DocAlias .objects .get (name = 'rfc9998' ),relationship_id = 'tohist' )
398+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc9999' ),relationship_id = 'tois' )
399+ doc .relateddocument_set .create (target = Document .objects .get (name = 'rfc9998' ),relationship_id = 'tohist' )
400400
401401 # get
402402 r = self .client .get (url )
@@ -449,9 +449,9 @@ def verify_relations(doc,target_name,status):
449449
450450 def setUp (self ):
451451 super ().setUp ()
452- IndividualRfcFactory (alias2__name = 'rfc14' , name = 'draft-was-never-issued ' ,std_level_id = 'unkn' )
453- WgRfcFactory (alias2__name = 'rfc9999' , name = 'draft-ietf-random-thing ' ,std_level_id = 'ps' )
454- WgRfcFactory (alias2__name = 'rfc9998' , name = 'draft-ietf-random-other-thing ' ,std_level_id = 'inf' )
452+ IndividualRfcFactory (name = 'rfc14 ' ,std_level_id = 'unkn' )
453+ WgRfcFactory (name = 'rfc9999 ' ,std_level_id = 'ps' )
454+ WgRfcFactory (name = 'rfc9998 ' ,std_level_id = 'inf' )
455455 DocumentFactory (type_id = 'statchg' ,name = 'status-change-imaginary-mid-review' ,notify = 'notify@example.org' )
456456
457457class StatusChangeSubmitTests (TestCase ):
0 commit comments