#NEWLINE# def add_test_run_metadata( meta_dict , test_run_id , session = None ) : #NEWLINE# #INDENT# "Add a metadata key value pairs for a specific run.\n\n    This method will take a dictionary and store key value pair metadata in the\n    DB associated with the specified run.\n\n    :param dict meta_dict: a dictionary which will generate a separate key\n                           value pair row associated with the test_run_id\n    :param str test_run_id: the uuid of the test_run to update. (value of the\n                            id column for the row to be updated)\n    :param session: optional session object if one isn't provided a new session\n                    will be acquired for the duration of this operation\n\n    :return list: The list of created metadata objects\n    :rtype: subunit2sql.models.TestRunMeta\n    " #NEWLINE# metadata = [ ] #NEWLINE# for ( key , value ) in meta_dict . items ( ) : #NEWLINE# #INDENT# meta = models . TestRunMetadata ( ) #NEWLINE# meta . key = key #NEWLINE# meta . value = value #NEWLINE# meta . test_run_id = test_run_id #NEWLINE# session = ( session or get_session ( ) ) #NEWLINE# with session . begin ( ) : #NEWLINE# #INDENT# session . add ( meta ) #NEWLINE# #UNINDENT# metadata . append ( meta ) #NEWLINE# #UNINDENT# return metadata