[SCM] morituri/master: * morituri/test/Makefile.am: * morituri/test/morituri.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json (added): * morituri/test/test_common_musicbrainzngs.py (added): Add test for previous bug of a release not having a date.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:37 UTC 2014


The following commit has been merged in the master branch:
commit 2be21bce3cc6c0ef83a6556fa602a8d0e441339c
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Fri Oct 28 17:50:18 2011 +0000

    	* morituri/test/Makefile.am:
    	* morituri/test/morituri.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json (added):
    	* morituri/test/test_common_musicbrainzngs.py (added):
    	  Add test for previous bug of a release not having a date.

diff --git a/ChangeLog b/ChangeLog
index 77c5e6b..df4168e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-10-28  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+	* morituri/test/Makefile.am:
+	* morituri/test/morituri.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json (added):
+	* morituri/test/test_common_musicbrainzngs.py (added):
+	  Add test for previous bug of a release not having a date.
+
+2011-10-28  Thomas Vander Stichele  <thomas at apestaart dot org>
+
 	* morituri/rip/main.py:
 	* morituri/common/musicbrainzngs.py:
 	* morituri/common/program.py:
diff --git a/morituri/test/Makefile.am b/morituri/test/Makefile.am
index 4b3e0bb..f803da7 100644
--- a/morituri/test/Makefile.am
+++ b/morituri/test/Makefile.am
@@ -6,6 +6,7 @@ EXTRA_DIST = \
 	test_common_accurip.py \
 	test_common_checksum.py \
 	test_common_musicbrainz.py \
+	test_common_musicbrainzngs.py \
 	test_common_program.py \
 	test_common_renamer.py \
 	test_image_cue.py \
@@ -29,6 +30,7 @@ EXTRA_DIST = \
 	release.08397059-86c1-463b-8ed0-cd596dbd174f.xml \
 	release.93a6268c-ddf1-4898-bf93-fb862b1c5c5e.xml \
 	release.c7d919f4-3ea0-4c4b-a230-b3605f069440.xml \
+	morituri.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json \
 	kanye.cue \
 	kings-separate.cue \
 	kings-single.cue \
diff --git a/morituri/test/morituri.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json b/morituri/test/morituri.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json
new file mode 100644
index 0000000..b8a0da3
--- /dev/null
+++ b/morituri/test/morituri.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json
@@ -0,0 +1 @@
+{"release": {"status": "Official", "artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "text-representation": {"language": "eng", "script": "Latn"}, "title": "Everybody Here Wants You", "artist-credit-phrase": "Jeff Buckley", "quality": "normal", "id": "3451f29c-9bb8-4cc5-bfcc-bd50104b94f8", "medium-list": [{"disc-list": [{"id": "C6N7.QADBQ968Qr8OOjxfQlGtA8-", "sectors": "122983"}, {"id": "wbjbST2jUHRZaB1inCyxxsL7Eqc-", "sectors": "122833"}], "position": "1", "track-list": [{"recording": {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "length": "286920", "artist-credit-phrase": "Jeff Buckley", "id": "8f8c284b-6818-4a66-a517-37dc8c04a881", "title": "Everybody Here Wants You"}, "position": "1"}, {"recording": {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "length": "204746", "artist-credit-phrase": "Jeff Buckley", "id": "7d939d14-06a2-478e-b279-ebe20fae8b2f", "title": "Thousand Fold"}, "position": "2"}, {"recording": {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "length": "288466", "artist-credit-phrase": "Jeff Buckley", "id": "54323c4c-e0f6-4a81-8b80-e1c0b822a3f7", "title": "Eternal Life (road version)"}, "position": "3"}, {"recording": {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "length": "574026", "artist-credit-phrase": "Jeff Buckley", "id": "4dda67d1-8123-4545-9a78-7b4232089e96", "title": "Hallelujah (live)"}, "position": "4"}, {"recording": {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "length": "284000", "artist-credit-phrase": "Jeff Buckley", "id": "5db42013-aa5c-4eb4-a549-46ca721990cf", "title": "Last Goodbye (live from Sydney)"}, "position": "5"}], "format": "CD"}]}}
\ No newline at end of file
diff --git a/morituri/test/test_common_musicbrainzngs.py b/morituri/test/test_common_musicbrainzngs.py
new file mode 100644
index 0000000..51446eb
--- /dev/null
+++ b/morituri/test/test_common_musicbrainzngs.py
@@ -0,0 +1,23 @@
+# -*- Mode: Python; test-case-name: morituri.test.test_common_musicbrainzngs -*-
+# vi:si:et:sw=4:sts=4:ts=4
+
+import os
+import json
+
+import unittest
+
+from morituri.common import musicbrainzngs
+
+
+class MetadataTestCase(unittest.TestCase):
+    def testJeffEverybodySingle(self):
+        path = os.path.join(os.path.dirname(__file__),
+            'morituri.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json')
+        handle = open(path, "rb")
+        response = json.loads(handle.read())
+        handle.close()
+        discid = "wbjbST2jUHRZaB1inCyxxsL7Eqc-"
+
+        metadata = musicbrainzngs._getMetadata(response['release'], discid)
+
+        self.failIf(metadata.release)

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list