From d71b2a155497da3fa1bc520410410013a232671c Mon Sep 17 00:00:00 2001
From: Manoj Jadhav <manoj.jadhav@shorelineiot.com>
Date: Sat, 27 Apr 2019 01:10:47 +0530
Subject: [PATCH 1/2] Added dependancy lib changes for djanngo 2.2 support

---
 requirements/optionals.txt | 2 +-
 requirements/testing.txt   | 8 ++++----
 tests/conftest.py          | 2 +-
 tests/test_serializers.py  | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/requirements/optionals.txt b/requirements/optionals.txt
index 169af96f..cc65f342 100644
--- a/requirements/optionals.txt
+++ b/requirements/optionals.txt
@@ -1,3 +1,3 @@
-oauth2==1.5.211
+oauth2==1.9.0.post1
 django-oauth-plus==2.2.6
 django-oauth2-provider==0.2.6.1
diff --git a/requirements/testing.txt b/requirements/testing.txt
index 22e38c79..ca067a02 100644
--- a/requirements/testing.txt
+++ b/requirements/testing.txt
@@ -1,4 +1,4 @@
-pytest==2.6.4
-pytest-django==2.8.0
-pytest-cov==1.6
-cryptography==2.0.3
+pytest==4.4.1
+pytest-django==3.4.8
+pytest-cov==2.6.1
+cryptography==2.6.1
\ No newline at end of file
diff --git a/tests/conftest.py b/tests/conftest.py
index fe079bc7..12468700 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -49,7 +49,7 @@ def pytest_configure():
         pass
     else:
         settings.INSTALLED_APPS += (
-            'oauth_provider',
+            'oauth2_provider',
         )
 
     try:
diff --git a/tests/test_serializers.py b/tests/test_serializers.py
index 2e6c7e53..23165443 100644
--- a/tests/test_serializers.py
+++ b/tests/test_serializers.py
@@ -71,7 +71,7 @@ def test_invalid_credentials(self):
         self.assertEqual(serializer.errors, expected_error)
 
     @unittest.skipIf(
-        django.VERSION[1] >= 10,
+        django.VERSION[1] >= 1,
         reason='The ModelBackend does not permit login when is_active is False.')
     def test_disabled_user(self):
         self.user.is_active = False

From 6be5243ae8e768d6c9b9959768f2079dfcd9c553 Mon Sep 17 00:00:00 2001
From: Manoj Jadhav <manoj.jadhav@shorelineiot.com>
Date: Sat, 27 Apr 2019 01:32:04 +0530
Subject: [PATCH 2/2] Added changes to check django version and add oauth lib

---
 tests/conftest.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/conftest.py b/tests/conftest.py
index 12468700..74298ba6 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -48,10 +48,14 @@ def pytest_configure():
     except ImportError:
         pass
     else:
-        settings.INSTALLED_APPS += (
-            'oauth2_provider',
-        )
-
+        if django.VERSION[0] > 1:
+            settings.INSTALLED_APPS += (
+                'oauth2_provider',
+            )
+        else:
+            settings.INSTALLED_APPS += (
+                'oauth_provider',
+            )
     try:
         if django.VERSION >= (1, 8):
             # django-oauth2-provider does not support Django1.8