Commit c265e632 authored by Priscila Manhaes's avatar Priscila Manhaes

ajust ffmpeg test for recognizing expected file format, but it still breaking without right codec

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@43571 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0eefa7c0
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
############################################################################## ##############################################################################
import unittest import unittest
import sha import magic
from cloudooo.handler.ffmpeg.handler import FFMPEGHandler from cloudooo.handler.ffmpeg.handler import FFMPEGHandler
from cloudooo.handler.tests.handlerTestCase import HandlerTestCase from cloudooo.handler.tests.handlerTestCase import HandlerTestCase
...@@ -40,13 +40,10 @@ class TestFFMPEGHandler(HandlerTestCase): ...@@ -40,13 +40,10 @@ class TestFFMPEGHandler(HandlerTestCase):
def testConvertVideo(self): def testConvertVideo(self):
"""Test coversion of video to another format""" """Test coversion of video to another format"""
# XXX - Hash might use md5, but it does not work for string file_detector = magic.Magic()
input_data = sha.new(self.data)
hash_input = input_data.digest()
output_data = self.input.convert("ogv") output_data = self.input.convert("ogv")
output = sha.new(output_data) file_format = file_detector.from_buffer(output_data)
hash_output = output.digest() self.assertEqual(file_format, 'Ogg data, Theora video')
self.assertTrue(hash_input != hash_output)
def test_suite(): def test_suite():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment