From 7745e754cff1ec0e1783cb4b9f583d914c2fb430 Mon Sep 17 00:00:00 2001 From: amplifi Date: Mon, 6 Mar 2017 18:57:19 +0700 Subject: [PATCH] Update tests for new icon path --- cadasta/resources/tests/test_models.py | 36 +++++++++----------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/cadasta/resources/tests/test_models.py b/cadasta/resources/tests/test_models.py index 3fcff61e2..0d6e5465b 100644 --- a/cadasta/resources/tests/test_models.py +++ b/cadasta/resources/tests/test_models.py @@ -64,8 +64,7 @@ def test_thumbnail_pdf(self): mime_type='application/pdf' ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/pdf.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/pdf.png') def test_thumbnail_mp3(self): resource = ResourceFactory.build( @@ -73,32 +72,28 @@ def test_thumbnail_mp3(self): mime_type='audio/mpeg3' ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/mp3.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/mp3.png') resource = ResourceFactory.build( file='http://example.com/dir/filename.mp3', mime_type='audio/x-mpeg-3' ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/mp3.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/mp3.png') resource = ResourceFactory.build( file='http://example.com/dir/filename.mp3', mime_type='video/mpeg' ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/mp3.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/mp3.png') resource = ResourceFactory.build( file='http://example.com/dir/filename.mp3', mime_type='video/x-mpeg' ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/mp3.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/mp3.png') def test_thumbnail_mp4(self): resource = ResourceFactory.build( @@ -106,8 +101,7 @@ def test_thumbnail_mp4(self): mime_type='video/mp4' ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/mp4.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/mp4.png') def test_thumbnail_doc(self): resource = ResourceFactory.build( @@ -115,8 +109,7 @@ def test_thumbnail_doc(self): mime_type='application/msword' ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/doc.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/doc.png') def test_thumbnail_docx(self): resource = ResourceFactory.build( @@ -125,8 +118,7 @@ def test_thumbnail_docx(self): 'wordprocessingml.document') ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/docx.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/docx.png') def test_thumbnail_xls(self): resource = ResourceFactory.build( @@ -134,16 +126,14 @@ def test_thumbnail_xls(self): mime_type='application/msexcel' ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/xls.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/xls.png') resource = ResourceFactory.build( file='http://example.com/dir/filename.doc', mime_type='application/vnd.ms-excel' ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/xls.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/xls.png') def test_thumbnail_xlsx(self): resource = ResourceFactory.build( @@ -152,16 +142,14 @@ def test_thumbnail_xlsx(self): '.spreadsheetml.sheet') ) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/xlsx.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/xlsx.png') def test_thumbnail_xml(self): resource = ResourceFactory.build( file='http://example.com/dir/filename.gpx', mime_type=('text/xml')) assert (resource.thumbnail == - 'https://s3-us-west-2.amazonaws.com/cadasta-platformprod-' - 'bucket/icons/xml.png') + 'https://s3-us-west-2.amazonaws.com/cadasta-resources/icons/xml.png') def test_thumbnail_other(self): resource = ResourceFactory.build(