@@ -1231,9 +1231,7 @@ def test_document_nonietf_pubreq_button(self):
12311231 self .assertEqual (r .status_code , 200 )
12321232 self .assertNotContains (r , "Request publication" )
12331233
1234-
12351234 def test_document_bibtex (self ):
1236-
12371235 rfc = WgRfcFactory .create (
12381236 #other_aliases = ['rfc6020',],
12391237 states = [('draft' ,'rfc' ),('draft-iesg' ,'pub' )],
@@ -1304,6 +1302,17 @@ def test_document_bibxml(self):
13041302 self .assertEqual (entry .find ('./seriesInfo' ).get ('value' ), docname )
13051303 self .assertEqual (entry .find ('./seriesInfo[@name="DOI"]' ), None )
13061304
1305+ def test_trailing_hypen_digit_name_bibxml (self ):
1306+ draft = WgDraftFactory (name = 'draft-ietf-mars-test-2' )
1307+ docname = '%s-%s' % (draft .name , draft .rev )
1308+ for viewname in [ 'ietf.doc.views_doc.document_bibxml' , 'ietf.doc.views_doc.document_bibxml_ref' ]:
1309+ # This will need to be adjusted if settings.URL_REGEXPS is changed
1310+ url = urlreverse (viewname , kwargs = dict (name = draft .name [:- 2 ], rev = draft .name [- 1 :]+ '-' + draft .rev ))
1311+ r = self .client .get (url )
1312+ entry = lxml .etree .fromstring (r .content )
1313+ self .assertEqual (entry .find ('./front/title' ).text , draft .title )
1314+ self .assertEqual (entry .find ('./seriesInfo' ).get ('value' ), docname )
1315+
13071316class AddCommentTestCase (TestCase ):
13081317 def test_add_comment (self ):
13091318 draft = WgDraftFactory (name = 'draft-ietf-mars-test' ,group__acronym = 'mars' )
0 commit comments