Esempio n. 1
0
    def test_addgenre_undef(self):
        """Add genre with undefined song
        """
        song = None

        result = addgenre(song)

        self.assertEqual(result, 1)
Esempio n. 2
0
    def test_addgenre(self):
        """Add genre
        """
        song = Song.objects.create(artist='Van Morrison',
                                   album='The Healing Game',
                                   title='Sometimes We Cry',
                                   genre='',
                                   score=0,
                                   played=0,
                                   family=0,
                                   global_score=0,
                                   cover='htt://foo.bar/img.png')

        result = addgenre(song)

        self.assertEqual(result, 0)