@@ -228,7 +228,6 @@ def test_frontpage(self):
228228 self .assertContains (r , "Document Search" )
229229
230230 def test_docs_for_ad (self ):
231- return # FIXME-LARS
232231 ad = RoleFactory (name_id = 'ad' ,group__type_id = 'area' ,group__state_id = 'active' ).person
233232 draft = IndividualDraftFactory (ad = ad )
234233 draft .action_holders .set ([PersonFactory ()])
@@ -273,7 +272,6 @@ def test_auth48_doc_for_ad(self):
273272 self .assertContains (r , 'title="AUTH48"' ) # title attribute of AUTH48 badge in auth48_alert_badge filter
274273
275274 def test_drafts_in_last_call (self ):
276- return # FIXME-LARS
277275 draft = IndividualDraftFactory (pages = 1 )
278276 draft .action_holders .set ([PersonFactory ()])
279277 draft .set_state (State .objects .get (type = "draft-iesg" , slug = "lc" ))
@@ -283,7 +281,6 @@ def test_drafts_in_last_call(self):
283281 self .assertContains (r , escape (draft .action_holders .first ().plain_name ()))
284282
285283 def test_in_iesg_process (self ):
286- return # FIXME-LARS
287284 doc_in_process = IndividualDraftFactory ()
288285 doc_in_process .action_holders .set ([PersonFactory ()])
289286 doc_in_process .set_state (State .objects .get (type = 'draft-iesg' , slug = 'lc' ))
@@ -334,7 +331,6 @@ def test_ajax_search_docs(self):
334331 self .assertEqual (data [0 ]["id" ], doc_alias .pk )
335332
336333 def test_recent_drafts (self ):
337- return # FIXME-LARS
338334 # Three drafts to show with various warnings
339335 drafts = WgDraftFactory .create_batch (3 ,states = [('draft' ,'active' ),('draft-iesg' ,'ad-eval' )])
340336 for index , draft in enumerate (drafts ):
@@ -800,7 +796,6 @@ def login(self, username):
800796 self .client .login (username = username , password = username + '+password' )
801797
802798 def test_edit_authors_permissions (self ):
803- return # FIXME-LARS
804799 """Only the secretariat may edit authors"""
805800 draft = WgDraftFactory (authors = PersonFactory .create_batch (3 ))
806801 RoleFactory (group = draft .group , name_id = 'chair' )
@@ -915,7 +910,6 @@ def _add_prefix(s):
915910 post_data [_add_prefix (str (form_index ) + '-ORDER' )] = str (insert_order )
916911
917912 def test_edit_authors_missing_basis (self ):
918- return # FIXME-LARS
919913 draft = WgDraftFactory ()
920914 DocumentAuthorFactory .create_batch (3 , document = draft )
921915 url = urlreverse ('ietf.doc.views_doc.edit_authors' , kwargs = dict (name = draft .name ))
@@ -932,7 +926,6 @@ def test_edit_authors_missing_basis(self):
932926 self .assertContains (r , 'This field is required.' )
933927
934928 def test_edit_authors_no_change (self ):
935- return # FIXME-LARS
936929 draft = WgDraftFactory ()
937930 DocumentAuthorFactory .create_batch (3 , document = draft )
938931 url = urlreverse ('ietf.doc.views_doc.edit_authors' , kwargs = dict (name = draft .name ))
@@ -1011,15 +1004,12 @@ def do_edit_authors_append_authors_test(self, new_author_count):
10111004 self .assertIn (auth .name , evt .desc )
10121005
10131006 def test_edit_authors_append_author (self ):
1014- return # FIXME-LARS
10151007 self .do_edit_authors_append_authors_test (1 )
10161008
10171009 def test_edit_authors_append_authors (self ):
1018- return # FIXME-LARS
10191010 self .do_edit_authors_append_authors_test (3 )
10201011
10211012 def test_edit_authors_insert_author (self ):
1022- return # FIXME-LARS
10231013 """Can add author in the middle of the list"""
10241014 draft = WgDraftFactory ()
10251015 DocumentAuthorFactory .create_batch (3 , document = draft )
@@ -1076,7 +1066,6 @@ def test_edit_authors_insert_author(self):
10761066 self .assertEqual (reorder_events .count (), 2 )
10771067
10781068 def test_edit_authors_remove_author (self ):
1079- return # FIXME-LARS
10801069 draft = WgDraftFactory ()
10811070 DocumentAuthorFactory .create_batch (3 , document = draft )
10821071 url = urlreverse ('ietf.doc.views_doc.edit_authors' , kwargs = dict (name = draft .name ))
@@ -1127,7 +1116,6 @@ def test_edit_authors_remove_author(self):
11271116 self .assertIn (reordered_person .name , reordered_event .desc )
11281117
11291118 def test_edit_authors_reorder_authors (self ):
1130- return # FIXME-LARS
11311119 draft = WgDraftFactory ()
11321120 DocumentAuthorFactory .create_batch (3 , document = draft )
11331121 url = urlreverse ('ietf.doc.views_doc.edit_authors' , kwargs = dict (name = draft .name ))
@@ -1184,7 +1172,6 @@ def test_edit_authors_reorder_authors(self):
11841172 )
11851173
11861174 def test_edit_authors_edit_fields (self ):
1187- return # FIXME-LARS
11881175 draft = WgDraftFactory ()
11891176 DocumentAuthorFactory .create_batch (3 , document = draft )
11901177 url = urlreverse ('ietf.doc.views_doc.edit_authors' , kwargs = dict (name = draft .name ))
@@ -1287,14 +1274,13 @@ def test_document_draft_shows_action_holders(self, mock_method):
12871274 with self .settings (DOC_ACTION_HOLDER_AGE_LIMIT_DAYS = 20 ):
12881275 r = self .client .get (url )
12891276
1290- # FIXME-LARS
1291- # self.assertContains(r, 'Action Holders') # should still be shown
1292- # q = PyQuery(r.content)
1293- # self.assertEqual(len(self._pyquery_select_action_holder_string(q, '(None)')), 0)
1294- # for person in draft.action_holders.all():
1295- # self.assertEqual(len(self._pyquery_select_action_holder_string(q, person.plain_name())), 1)
1296- # # check that one action holder was marked as old
1297- # self.assertEqual(len(self._pyquery_select_action_holder_string(q, 'for 30 days')), 1)
1277+ self .assertContains (r , 'Action Holders' ) # should still be shown
1278+ q = PyQuery (r .content )
1279+ self .assertEqual (len (self ._pyquery_select_action_holder_string (q , '(None)' )), 0 )
1280+ for person in draft .action_holders .all ():
1281+ self .assertEqual (len (self ._pyquery_select_action_holder_string (q , person .plain_name ())), 1 )
1282+ # check that one action holder was marked as old
1283+ self .assertEqual (len (self ._pyquery_select_action_holder_string (q , 'for 30 days' )), 1 )
12981284
12991285 @mock .patch .object (Document , 'action_holders_enabled' , return_value = True , new_callable = mock .PropertyMock )
13001286 def test_document_draft_action_holders_buttons (self , mock_method ):
@@ -1456,12 +1442,11 @@ def _change_state(doc, state):
14561442
14571443class DocTestCase (TestCase ):
14581444 def test_status_change (self ):
1459- return # FIXME-LARS
14601445 statchg = StatusChangeFactory ()
14611446 r = self .client .get (urlreverse ("ietf.doc.views_doc.document_main" , kwargs = dict (name = statchg .name )))
14621447 self .assertEqual (r .status_code , 200 )
1463- r = self .client .get (urlreverse ("ietf.doc.views_doc.document_main" , kwargs = dict (name = statchg .relateddocument_set .first ().target .document . canonical_name () )))
1464- self .assertEqual (r .status_code , 200 )
1448+ r = self .client .get (urlreverse ("ietf.doc.views_doc.document_main" , kwargs = dict (name = statchg .relateddocument_set .first ().target .document )))
1449+ self .assertEqual (r .status_code , 302 )
14651450
14661451 def test_document_charter (self ):
14671452 CharterFactory (name = 'charter-ietf-mars' )
@@ -2381,7 +2366,6 @@ def test_personal_chart(self):
23812366
23822367class FieldTests (TestCase ):
23832368 def test_searchabledocumentsfield_pre (self ):
2384- return # FIXME-LARS
23852369 # so far, just tests that the format expected by select2 set up
23862370 docs = IndividualDraftFactory .create_batch (3 )
23872371
@@ -2391,8 +2375,7 @@ class _TestForm(Form):
23912375 form = _TestForm (initial = dict (test_field = docs ))
23922376 html = str (form )
23932377 q = PyQuery (html )
2394- json_data = q ('input.select2-field' ).attr ('data-pre' )
2395- print (json_data )
2378+ json_data = q ('.select2-field' ).attr ('data-pre' )
23962379 try :
23972380 decoded = json .loads (json_data )
23982381 except json .JSONDecodeError as e :
@@ -2401,7 +2384,7 @@ class _TestForm(Form):
24012384 self .assertCountEqual (decoded_ids , [str (doc .id ) for doc in docs ])
24022385 for doc in docs :
24032386 self .assertEqual (
2404- dict (id = doc .pk , text = escape (uppercase_std_abbreviated_name (doc .name ))),
2387+ dict (id = doc .pk , selected = True , text = escape (uppercase_std_abbreviated_name (doc .name ))),
24052388 decoded [str (doc .pk )],
24062389 )
24072390
0 commit comments