def test_equality_with_different_releases(self): label1 = DeliveryLabel(name='aaa') label2 = DeliveryLabel(name='aaa') release1 = DeliveryRelease(pk=1, title='release1') release2 = DeliveryRelease(pk=1, title='release2') label1.release = release1 label2.release = release2 release1.label = label1 release2.label = label2 self.assertEqual(label1, label2)
def _init_expected_data(self): artist = DeliveryArtist(pk=12, name='Wax Tailor') label = DeliveryLabel(pk=103, name=u"Atmosphériques") territories = tuple(['AD', 'BE', 'CH', 'FR', 'GP', 'GY', 'LU', 'MC', 'MQ', 'NC', 'NL', 'PF', 'PM', 'RE', 'YT']) release = DeliveryRelease(pk=911, title='Hope & Sorrow', territories=territories, upc=3596971288129, publish_date=datetime.strptime('2007-04-02', '%Y-%m-%d').date(), publish_date_digital=datetime.strptime('2007-04-02', '%Y-%m-%d').date(), price=u'B0', compil=False) release.label = label release.artist = artist artist.release = release label.release = release self.expected_release = release self.expected_artist = artist self.expected_label = label
def setUp(self): self.delivery_path = TEST_COMMON + u'/batch_compil1/3700360703968' self.delivery = IDOLDelivery(self.delivery_path) # Expected datas artist = None label = DeliveryLabel(pk=44, name=u"Kitsuné") territories = tuple(['AD', 'AL', 'AT', 'AZ', 'BA', 'BE', 'BG', 'BY', 'CH', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FO', 'FR', 'GB', 'GI', 'GR', 'HR', 'HU', 'IE', 'IS', 'IT', 'LI', 'LT', 'LU', 'LV', 'MC', 'MD', 'MK', 'MT', 'NL', 'NO', 'PL', 'PT', 'RO', 'RU', 'SE', 'SI', 'SJ', 'SK', 'SM', 'UA', 'VA']) release = DeliveryRelease(pk=774, title=u'Kitsuné Maison Compilation', territories=territories, upc=3700360703968, publish_date=datetime.strptime('2005-10-03', '%Y-%m-%d').date(), publish_date_digital=datetime.strptime('2007-03-05', '%Y-%m-%d').date(), price=u'B0', compil=True) release.label = label release.artist = artist label.release = release self.expected_release = release self.expected_artist = artist self.expected_label = label self.expected_styles = [DeliveryStyle(name="Electronique : Electro, House"),]