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