def submit_barcodes(barcodes): """ Submits a set of {release1: barcode1, release2:barcode2} Must call auth(user, pass) first """ query = mbxml.make_barcode_request(barcodes) return _do_mb_post("release", query)
def submit_barcodes(release_barcode): """Submits a set of {release_id1: barcode, ...}""" query = mbxml.make_barcode_request(release_barcode) return _do_mb_post("release", query)
def testMakeBarcode(self): expected = ('<ns0:metadata xmlns:ns0="http://musicbrainz.org/ns/mmd-2.0#">' '<ns0:release-list><ns0:release ns0:id="trid"><ns0:barcode>12345</ns0:barcode>' '</ns0:release></ns0:release-list></ns0:metadata>') xml = mbxml.make_barcode_request({'trid':'12345'}) self.assertEqual(expected, xml)