diff --git a/mkt/developers/tests/test_utils_.py b/mkt/developers/tests/test_utils_.py index 2e7c349747..7f2d75f059 100644 --- a/mkt/developers/tests/test_utils_.py +++ b/mkt/developers/tests/test_utils_.py @@ -1,3 +1,5 @@ +from django.core.files.storage import default_storage as storage + import amo.tests from mkt.developers.utils import check_upload @@ -10,6 +12,6 @@ class TestCheckUpload(amo.tests.TestCase, amo.tests.AMOPaths): check_upload([], 'graphic', 'image/jpg') def test_valid(self): - errors, hash = check_upload(open(self.preview_image(), 'r'), - 'preview', 'image/png') - assert not errors + with storage.open(self.preview_image()) as f: + errors, hash = check_upload(f, 'preview', 'image/png') + assert not errors