Ejemplo n.º 1
0
class ExtractOperationTest(unittest.TestCase):

    def setUp(self):
        self.song = Mock()
        self.song.filename = '01 - Dennis Brown - Here I Come.mp3'
        self.extract_operation = ExtractOperation()

    def test_apply(self):
        self.extract_operation.apply(self.song)

        self.song.update.assert_called_with({'tracknumber': '01',
                                             'artist': 'Dennis Brown',
                                             'title': 'Here I Come'})
Ejemplo n.º 2
0
class ExtractOperationTest(unittest.TestCase):
    def setUp(self):
        self.song = Mock()
        self.song.filename = '01 - Dennis Brown - Here I Come.mp3'
        self.extract_operation = ExtractOperation()

    def test_apply(self):
        self.extract_operation.apply(self.song)

        self.song.update.assert_called_with({
            'tracknumber': '01',
            'artist': 'Dennis Brown',
            'title': 'Here I Come'
        })
Ejemplo n.º 3
0
 def setUp(self):
     self.song = Mock()
     self.song.filename = '01 - Dennis Brown - Here I Come.mp3'
     self.extract_operation = ExtractOperation()
Ejemplo n.º 4
0
 def setUp(self):
     self.song = Mock()
     self.song.filename = '01 - Dennis Brown - Here I Come.mp3'
     self.extract_operation = ExtractOperation()