Code Duplication    Length = 19-20 lines in 2 locations

elodie/tests/media/audio_test.py 2 locations

@@ 190-209 (lines=20) @@
187
188
    assert metadata['title'] == 'my audio title', metadata['title']
189
190
def test_set_title_non_ascii():
191
    temporary_folder, folder = helper.create_working_folder()
192
193
    origin = '%s/audio.m4a' % folder
194
    shutil.copyfile(helper.get_file('audio.m4a'), origin)
195
196
    audio = Audio(origin)
197
    origin_metadata = audio.get_metadata()
198
199
    unicode_title = u'形声字 / 形聲字'
200
    status = audio.set_title(unicode_title)
201
202
    assert status == True, status
203
204
    audio_new = Audio(origin)
205
    metadata = audio_new.get_metadata()
206
207
    shutil.rmtree(folder)
208
209
    assert metadata['title'] == unicode_title, metadata['title']
210
@@ 170-188 (lines=19) @@
167
    assert helper.isclose(metadata['latitude'], -11.111111), metadata['latitude']
168
    assert helper.isclose(metadata['longitude'], -99.999999), metadata['longitude']
169
170
def test_set_title():
171
    temporary_folder, folder = helper.create_working_folder()
172
173
    origin = '%s/audio.m4a' % folder
174
    shutil.copyfile(helper.get_file('audio.m4a'), origin)
175
176
    audio = Audio(origin)
177
    origin_metadata = audio.get_metadata()
178
179
    status = audio.set_title('my audio title')
180
181
    assert status == True, status
182
183
    audio_new = Audio(origin)
184
    metadata = audio_new.get_metadata()
185
186
    shutil.rmtree(folder)
187
188
    assert metadata['title'] == 'my audio title', metadata['title']
189
190
def test_set_title_non_ascii():
191
    temporary_folder, folder = helper.create_working_folder()