[Python-modules-commits] [python-social-auth] 47/89: Add test
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:15:54 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 ffc5bf19d3b199f7605ce450813c51fe70d50fe9
Author: Julian Bez <julian.bez at gmail.com>
Date: Tue Feb 16 17:44:48 2016 +0100
Add test
---
social/tests/backends/test_itembase.py | 45 ++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/social/tests/backends/test_itembase.py b/social/tests/backends/test_itembase.py
new file mode 100644
index 0000000..5758e50
--- /dev/null
+++ b/social/tests/backends/test_itembase.py
@@ -0,0 +1,45 @@
+import json
+
+from social.tests.backends.oauth import OAuth2Test
+
+
+class ItembaseOAuth2Test(OAuth2Test):
+ backend_path = 'social.backends.itembase.ItembaseOAuth2'
+ user_data_url = 'https://users.itembase.com/v1/me'
+ expected_username = 'foobar'
+ access_token_body = json.dumps({
+ "access_token": "foobar-token",
+ "expires_in": 2592000,
+ "token_type": "bearer",
+ "scope": "user.minimal",
+ "refresh_token": "foobar-refresh-token"
+ })
+ user_data_body = json.dumps({
+ "uuid": "a4b91ee7-ec1a-49b9-afce-371dc8797749",
+ "username": "foobar",
+ "email": "foobar at itembase.biz",
+ "first_name": "Foo",
+ "middle_name": None,
+ "last_name": "Bar",
+ "name_format": "first middle last",
+ "locale": "en",
+ "preferred_currency": "EUR"
+ })
+ refresh_token_body = json.dumps({
+ "access_token": "foobar-new-token",
+ "expires_in": 2592000,
+ "token_type": "bearer",
+ "scope": "user.minimal",
+ "refresh_token": "foobar-new-refresh-token"
+ })
+
+ def test_login(self):
+ self.do_login()
+
+ def test_partial_pipeline(self):
+ self.do_partial_pipeline()
+
+
+class ItembaseOAuth2SandboxTest(OAuth2Test):
+ backend_path = 'social.backends.itembase.ItembaseOAuth2Sandbox'
+ user_data_url = 'http://sandbox.users.itembase.io/v1/me'
--
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