Commit 04cbb21d authored by Seb's avatar Seb
Browse files

Fixed where patched method being assigned. Added mock as tox dependancy

parent 883b6b8d
......@@ -106,9 +106,9 @@ class TestVideoAddView(TestCase, WagtailTestUtils):
root_collection = Collection.get_first_root_node()
self.assertEqual(video.collection, root_collection)
@patch('wagtailvideos.utils.ffmpeg_installed')
def test_add_no_ffmpeg(self, mock_ffmpeg):
mock_ffmpeg.return_value = False
@patch('wagtailvideos.models.ffmpeg_installed')
def test_add_no_ffmpeg(self, ffmpeg_installed):
ffmpeg_installed.return_value = False
video_file = create_test_video_file()
title = 'no_ffmpeg'
......@@ -125,6 +125,7 @@ class TestVideoAddView(TestCase, WagtailTestUtils):
videos = Video.objects.filter(title=title)
self.assertEqual(videos.count(), 1)
video = videos.first()
self.assertFalse(video.thumbnail)
self.assertFalse(video.duration)
......
......@@ -16,6 +16,7 @@ basepython =
py35: python3.5
deps =
mock
dj18: Django~=1.8.0
dj19: Django~=1.9.0
wt13: wagtail~=1.3.0
......
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