From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Sun, 26 May 2019 19:21:16 +0200
Subject: Skip tests if required modules are not installed.

---
 tests/integration/test_azure.py | 6 ++++++
 tests/test_azure.py             | 6 ++++++
 tests/test_dropbox.py           | 6 ++++++
 tests/test_gcloud.py            | 6 ++++++
 tests/test_s3boto3.py           | 6 ++++++
 tests/test_sftp.py              | 7 ++++++-
 6 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/tests/integration/test_azure.py b/tests/integration/test_azure.py
index cadcac6..0f57dc5 100644
--- a/tests/integration/test_azure.py
+++ b/tests/integration/test_azure.py
@@ -1,3 +1,9 @@
+import unittest
+try:
+    import azure
+except ImportError:
+    raise unittest.SkipTest("azure package not installed, skipping tests")
+
 import io
 
 from django import forms
diff --git a/tests/test_azure.py b/tests/test_azure.py
index 8d5b57b..6da968b 100644
--- a/tests/test_azure.py
+++ b/tests/test_azure.py
@@ -1,3 +1,9 @@
+import unittest
+try:
+    import azure
+except ImportError:
+    raise unittest.SkipTest("azure package not installed, skipping tests")
+
 import datetime
 from datetime import timedelta
 from unittest import mock
diff --git a/tests/test_dropbox.py b/tests/test_dropbox.py
index 8913f36..1f37307 100644
--- a/tests/test_dropbox.py
+++ b/tests/test_dropbox.py
@@ -1,3 +1,9 @@
+import unittest
+try:
+    import dropbox
+except ImportError:
+    raise unittest.SkipTest("dropbox package not installed, skipping tests")
+
 import io
 from datetime import datetime
 from unittest import mock
diff --git a/tests/test_gcloud.py b/tests/test_gcloud.py
index 68a9266..93364c0 100644
--- a/tests/test_gcloud.py
+++ b/tests/test_gcloud.py
@@ -1,3 +1,9 @@
+import unittest
+try:
+    import google.cloud
+except ImportError:
+    raise unittest.SkipTest("google.cloud package not installed, skipping tests")
+
 import mimetypes
 from datetime import datetime, timedelta
 from unittest import mock
diff --git a/tests/test_s3boto3.py b/tests/test_s3boto3.py
index 627a250..0a42838 100644
--- a/tests/test_s3boto3.py
+++ b/tests/test_s3boto3.py
@@ -1,3 +1,9 @@
+import unittest
+try:
+    import boto3
+except ImportError:
+    raise unittest.SkipTest("boto3 package not installed, skipping tests")
+
 import gzip
 import pickle
 import threading
diff --git a/tests/test_sftp.py b/tests/test_sftp.py
index 094c444..695a4c7 100644
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -1,10 +1,15 @@
+import unittest
+try:
+    import paramiko
+except ImportError:
+    raise unittest.SkipTest("boto package not installed, skipping tests")
+
 import io
 import os
 import stat
 from datetime import datetime
 from unittest.mock import MagicMock, patch
 
-import paramiko
 from django.core.files.base import File
 from django.test import TestCase, override_settings
 
