[Python-modules-commits] [python-social-auth] 30/89: added tests
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:15:44 UTC 2016
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to tag v0.2.15
in repository python-social-auth.
commit fbaa002d8970c05ff6f3bf4e2ffeb8e912f5cd7d
Author: Alain St. Pierre <alain at aspcanada.com>
Date: Wed Mar 2 17:12:32 2016 -0800
added tests
---
docs/backends/index.rst | 1 +
social/tests/backends/test_arcgis.py | 27 +++++++++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/docs/backends/index.rst b/docs/backends/index.rst
index 3d6b7e6..ba4de6e 100644
--- a/docs/backends/index.rst
+++ b/docs/backends/index.rst
@@ -51,6 +51,7 @@ Social backends
angel
aol
appsfuel
+ arcgis
azuread
battlenet
beats
diff --git a/social/tests/backends/test_arcgis.py b/social/tests/backends/test_arcgis.py
new file mode 100644
index 0000000..39d4b6e
--- /dev/null
+++ b/social/tests/backends/test_arcgis.py
@@ -0,0 +1,27 @@
+import json
+from social.tests.backends.oauth import OAuth2Test
+
+
+class ArcGISOAuth2Test(OAuth2Test):
+ user_data_url = 'https://www.arcgis.com/sharing/rest/community/self'
+ backend_path = 'social.backends.arcgis.ArcGISOAuth2'
+ expected_username = 'gis at rocks.com'
+
+ user_data_body = json.dumps({
+ "first_name": "Gis",
+ "last_name": "Rocks",
+ "email": "gis at rocks.com",
+ "fullName": "Gis Rocks",
+ "username": "gis at rocks.com"
+ })
+
+ access_token_body = json.dumps({
+ "access_token": "CM-gcB85taGhRmoI7l3PSGaXUNsaLkTg-dHH7XtA9DnlinPYKBBrIvFzhd1JtDhh7hEwSv_6eLLcLtUqe3gD6i1yaYYFpUQJwy8KEujke5AE87tP9XIoMtp4_l320pUL",
+ "expires_in": 86400
+ })
+
+ def test_login(self):
+ self.do_login()
+
+ def test_partial_pipeline(self):
+ self.do_partial_pipeline()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git
More information about the Python-modules-commits
mailing list