def test_docinfo():
 exampledocinfo = env.metadata['metadata']
 expecteddocinfo = {'author': u'David Goodger', 'authors': [u'Me', u'Myself', u'I'], 'address': u'123 Example Street\nExample, EX  Canada\nA1B 2C3', 'field name': u'This is a generic bibliographic field.', 'field name 2': u'Generic bibliographic fields may contain multiple body elements.\n\nLike this.', 'status': u'This is a "work in progress"', 'version': u'1', 'copyright': u"This document has been placed in the public domain. You\nmay do with it as you wish. You may copy, modify,\nredistribute, reattribute, sell, buy, rent, lease,\ndestroy, or improve it, quote it at length, excerpt,\nincorporate, collate, fold, staple, or mutilate it, or do\nanything else to it that your or anyone else's heart\ndesires.", 'contact': u'goodger@python.org', 'date': u'2006-05-21', 'organization': u'humankind', 'revision': u'4564'}
 for key in exampledocinfo:
  (yield (assert_equals, exampledocinfo.get(key), expecteddocinfo.get(key)))
 (yield (assert_equals, set(expecteddocinfo.keys()), set(exampledocinfo.keys())))

def test_docinfo ( ) : exampledocinfo = env . metadata [ 'metadata' ] expecteddocinfo = { 'author' : u'David Goodger' , 'authors' : [ u'Me' , u'Myself' , u'I' ] , 'address' : u'123 Example Street\nExample, EX  Canada\nA1B 2C3' , 'field name' : u'This is a generic bibliographic field.' , 'field name 2' : u'Generic bibliographic fields may contain multiple body elements.\n\nLike this.' , 'status' : u'This is a "work in progress"' , 'version' : u'1' , 'copyright' : u"This document has been placed in the public domain. You\nmay do with it as you wish. You may copy, modify,\nredistribute, reattribute, sell, buy, rent, lease,\ndestroy, or improve it, quote it at length, excerpt,\nincorporate, collate, fold, staple, or mutilate it, or do\nanything else to it that your or anyone else's heart\ndesires." , 'contact' : u'goodger@python.org' , 'date' : u'2006-05-21' , 'organization' : u'humankind' , 'revision' : u'4564' } for key in exampledocinfo : ( yield ( assert_equals , exampledocinfo . get ( key ) , expecteddocinfo . get ( key ) ) ) ( yield ( assert_equals , set ( expecteddocinfo . keys ( ) ) , set ( exampledocinfo . keys ( ) ) ) )
inspect the docinfo metadata stored in the first node of the document .