import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('reddit') CONFIG = { 'login_xpath': '//*[@id="user_login"]', 'password_xpath': '//*[@id="passwd_login"]', 'consent_xpaths': [ '//*[@id="login_login"]/div/p/button', '/html/body/div[2]/div/div[2]/form/div/input[1]', ], 'class_': oauth2.Reddit, 'scope': oauth2.Reddit.user_info_scope, 'user': { 'id': conf.user_id, 'email': None, 'username': conf.user_username, 'name': conf.user_username, 'first_name': None, 'last_name': None, 'nickname': None, 'birth_date': None, 'city': None, 'country': None, 'gender': None, 'link': None, 'locale': None, 'phone': None, 'picture': None,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration("deviantart") PICTURE = "https://a.deviantart.net/avatars/p/e/{0}.jpg?1".format(conf.user_username) CONFIG = { "class_": oauth2.DeviantART, "scope": oauth2.DeviantART.user_info_scope, "fixture": fixtures.providers.DeviantART(conf.user_login, conf.user_password), "user": { "id": None, "email": None, "username": conf.user_username, "name": conf.user_username, "first_name": None, "last_name": None, "nickname": None, "birth_date": None, "city": None, "country": None, "gender": None, "link": None, "locale": None, "phone": None, "picture": PICTURE, "postal_code": None, "timezone": None,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('google') LINK = 'https://plus.google.com/' + conf.user_id CONFIG = { 'class_': oauth2.Google, 'scope': oauth2.Google.user_info_scope, 'fixture': fixtures.providers.GoogleFixture(conf.user_login, conf.user_password), 'offline': True, 'user': { 'id': conf.user_id, 'email': conf.user_email, 'username': None, 'name': conf.user_name, 'first_name': conf.user_first_name, 'last_name': conf.user_last_name, 'nickname': None, 'birth_date': None, 'city': None, 'country': None, 'gender': conf.user_gender, 'link': LINK, 'locale': conf.user_locale, 'phone': None, 'picture': conf.user_picture,
import re import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('github') LINK = 'https://github.com/{0}'.format(conf.user_username) PICTURE = re.compile(r'https://avatars\.githubusercontent.com/u/{0}\?v=\d' .format(conf.user_id)) CONFIG = { 'login_xpath': '//*[@id="login_field"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="site-container"]/div/div[2]/form/p/button', ], 'class_': oauth2.GitHub, 'scope': oauth2.GitHub.user_info_scope, 'access_headers': { 'User-Agent': 'Authomatic.py Automated Functional Tests' }, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': conf.user_email, 'first_name': None, 'gender': None,
import fixtures from authomatic.providers import openid conf = fixtures.get_configuration("openid_wordpress") OPENID_IDENTIFIER = "https://{0}.wordpress.com/".format(conf.user_username) CONFIG = { "openid_identifier": OPENID_IDENTIFIER, "logout_url": "https://peterhudec.wordpress.com/wp-login.php?action=logout", "login_url": "https://wordpress.com/wp-login.php", "login_xpath": '//*[@id="user_login"]', "password_xpath": '//*[@id="user_pass"]', "consent_xpaths": ['//*[@id="main"]/div/form/p[3]/input[2]'], "after_login_wait_seconds": 1, "consent_wait_seconds": 1, "class_": openid.OpenID, "user": { "id": OPENID_IDENTIFIER, "email": conf.user_email, "username": None, "name": conf.user_name, "first_name": None, "last_name": None, "nickname": conf.user_nickname, "birth_date": None, "city": None, "country": None, "gender": None, "link": None, "locale": None,
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('tumblr') CONFIG = { 'logout_url': 'https://www.tumblr.com/logout', 'login_xpath': '//*[@id="signup_email"]', 'password_xpath': '//*[@id="signup_password"]', 'consent_xpaths': [ '//*[@id="api_v1_oauth_authorize"]' '/div[2]/div/div[1]/div/div/div[2]/form/button[2]', ], 'consent_wait_seconds': 3, 'class_': oauth1.Tumblr, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'gender': None, 'id': conf.user_id, 'first_name': None, 'last_name': None, 'link': None, 'locale': None, 'location': None,
import fixtures from authomatic.providers import openid conf = fixtures.get_configuration('openid_yahoo') CONFIG = { 'openid_identifier': 'me.yahoo.com', 'login_xpath': '//*[@id="login-username"]', 'password_xpath': '//*[@id="login-passwd"]', 'consent_xpaths': [ '//*[@id="login-signin"]', '//*[@id="agree"]', ], 'after_consent_wait_seconds': 3, 'logout_url': 'https://login.yahoo.com/config/login?logout=1', 'class_': openid.OpenID, 'user': { 'id': conf.user_id, 'email': conf.user_email, 'username': None, 'name': conf.user_name, 'first_name': None, 'last_name': None, 'nickname': None, 'birth_date': None, 'city': None, 'country': None, 'gender': None, 'link': None, 'locale': None, 'location': None,
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('yahoo') LINK = 'http://profile.yahoo.com/{0}'.format(conf.user_id) PITURE = re.compile(r'https://\w+.yimg.com/dg/users/\w+==.large.png') CONFIG = { 'login_xpath': '//*[@id="login-username"]', 'password_xpath': '//*[@id="login-passwd"]', 'consent_xpaths': [ '//*[@id="xagree"]', ], 'consent_wait_seconds': 3, 'logout_url': 'https://login.yahoo.com/config/login?logout=1', 'class_': oauth1.Yahoo, 'user': { 'birth_date': conf.user_birth_date_str, 'city': conf.user_city, 'country': conf.user_country, 'email': None, 'gender': re.compile(r'^\w$'), 'id': conf.user_id, 'first_name': None, 'last_name': None, 'link': LINK,
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('yahoo') LINK = 'http://profile.yahoo.com/{0}'.format(conf.user_id) PITURE = re.compile(r'https://\w+.yimg.com/dg/users/\w+==.large.png') CONFIG = { 'login_xpath': '//*[@id="login-username"]', 'password_xpath': '//*[@id="login-passwd"]', 'consent_xpaths': [ '//*[@id="xagree"]', ], 'consent_wait_seconds': 3, 'logout_url': 'https://login.yahoo.com/config/login?logout=1', 'class_': oauth1.Yahoo, 'user': { 'birth_date': conf.user_birth_date_str, 'city': conf.user_city, 'country': conf.user_country, 'email': None, 'gender': re.compile(r'^\w$'),
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('xing') LINK = 'https://www.xing.com/profile/{0}'.format(conf.user_username) PITURE = re.compile( r'https://x\d+.xingassets.com/assets/frontend_minified/img/' r'users/\w+.140x185.jpg') CONFIG = { 'logout_url': 'https://www.xing.com/app/user?op=logout', 'login_xpath': '//*[@id="login_form_username"]', 'password_xpath': '//*[@id="login_form_password"]', 'consent_xpaths': [ '//*[@id="oauth-container"]/div/div/div/form/input[5]', ], 'consent_wait_seconds': 3, 'class_': oauth1.Xing, 'user': { 'birth_date': conf.user_birth_date_str, 'city': re.compile(r'^[\w. -]+$'), 'country': re.compile(r'^\w{2}$'),
import re import fixtures import constants from authomatic.providers import openid conf = fixtures.get_configuration('openid_verisignlabs') CONFIG = { 'login_xpath': '//*[@id="mainbody"]/form/table/tbody/tr[2]/td[2]/input', 'password_xpath': '//*[@id="mainbody"]/form/table/tbody/tr[3]/td[2]/input', 'consent_xpaths': ['//*[@id="TrustAuthenticateExchange"]/div[2]/input[2]'], 'class_': openid.OpenID, 'user': { 'id': conf.user_id, 'email': conf.user_email, 'username': None, 'name': conf.user_name, 'first_name': None, 'last_name': None, 'nickname': conf.user_nickname, 'birth_date': conf.user_birth_date, 'city': None, 'country': conf.user_country, 'gender': conf.user_gender, 'link': None, 'locale': conf.user_locale, 'phone': None, 'picture': None, 'postal_code': conf.user_postal_code, 'timezone': conf.user_timezone,
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('tumblr') CONFIG = { 'logout_url': 'https://www.tumblr.com/logout', 'login_xpath': '//*[@id="signup_email"]', 'password_xpath': '//*[@id="signup_password"]', 'consent_xpaths': [ '//*[@id="api_v1_oauth_authorize"]' '/div[2]/div/div[1]/div/div/div[2]/form/button[2]', ], 'consent_wait_seconds': 3, 'class_': oauth1.Tumblr, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'gender': None, 'id': conf.user_id, 'first_name': None,
import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('flickr') CONFIG = { 'login_xpath': '//*[@id="login-username"]', 'password_xpath': '//*[@id="login-passwd"]', 'consent_xpaths': [ '//*[@id="permissions"]/form/div/input[1]', ], 'consent_wait_seconds': 6, 'logout_url': 'https://login.yahoo.com/config/login?logout=1', 'class_': oauth1.Flickr, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'gender': None, 'id': conf.user_id, 'first_name': None, 'last_name': None, 'link': None, 'locale': None, 'location': None, 'name': conf.user_name, 'nickname': None, 'phone': None, 'picture': None,
# -*- coding: utf-8 -*- import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('paypal') CONFIG = { 'logout_url': 'https://www.paypal.com/sk/cgi-bin/webscr?cmd=_logout', 'class_': oauth2.PayPal, 'scope': oauth2.PayPal.user_info_scope, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'first_name': None, 'gender': None, 'id': None, 'last_name': None, 'link': None, 'locale': None, 'location': None, 'name': None, 'nickname': None, 'phone': None, 'picture': None, 'postal_code': None, 'timezone': None, 'username': None,
# -*- coding: utf-8 -*- import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('xero') CONFIG = { 'logout_url': 'https://my.xero.com/logout', 'login_xpath': '//*[@id="email"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="SelectedOrganisation_toggle"]', '//*[@id="SelectedOrganisation_suggestions"]/div/div', '//*[@id="ext-gen4"]' ], 'consent_wait_seconds': 5, 'after_consent_wait_seconds': 10, 'class_': oauth1.Xero, 'user': { 'birth_date': None, 'city': None, 'country': None,
import re import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('facebook') LINK = 'https://www.facebook.com/' + conf.user_username_reverse PICTURE = 'http://graph.facebook.com/{0}/picture?type=large'\ .format(conf.user_username_reverse) CONFIG = { 'login_xpath': '//*[@id="email"]', 'password_xpath': '//*[@id="pass"]', 'consent_xpaths': [ '//*[@id="platformDialogForm"]/div[2]/div/table/tbody/tr/td[2]/button[2]' ], 'class_': oauth2.Facebook, 'scope': oauth2.Facebook.user_info_scope, 'user': { 'id': conf.user_id, 'email': conf.user_email, 'username': conf.user_username_reverse, 'name': conf.user_name, 'first_name': conf.user_first_name, 'last_name': conf.user_last_name, 'nickname': None, 'birth_date': None, 'city': conf.user_city, 'country': conf.user_country,
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('bitbucket') LINK = 'https://bitbucket.org/api/1.0/users/{0}'.format(conf.user_username) CONFIG = { 'logout_url': 'https://bitbucket.org/account/signout/', 'login_xpath': '//*[@id="id_username"]', 'password_xpath': '//*[@id="id_password"]', 'consent_xpaths': [ '//*[@id="oauth-authorize"]/section/form/div/div/button', ], 'class_': oauth1.Bitbucket, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'first_name': conf.user_first_name, 'gender': None, 'id': conf.user_id, 'last_name': conf.user_last_name,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('foursquare') CONFIG = { 'login_xpath': '//*[@id="username"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="loginFormButton"]', ], 'class_': oauth2.Foursquare, 'scope': oauth2.Foursquare.user_info_scope, 'user': { 'id': conf.user_id, 'email': conf.user_email, 'username': None, 'name': conf.user_name, 'first_name': conf.user_first_name, 'last_name': conf.user_last_name, 'nickname': None, 'birth_date': None, 'city': conf.user_city, 'country': conf.user_country, 'gender': conf.user_gender, 'link': None, 'locale': None, 'phone': conf.user_phone, 'picture': conf.user_picture,
from datetime import datetime import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('yammer') LINK = 'https://www.yammer.com/peterhudec.com/users/{0}'\ .format(conf.user_username) # Yammer allows users to only set month and day of their birth day. # The year is always 1900. BD = datetime.strptime(conf.user_birth_date, '%x') BIRTH_DATE = datetime(1900, BD.month, BD.day).strftime('%x') CONFIG = { 'login_xpath': '//*[@id="login"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="login-form"]/fieldset[2]/p[2]/button', '//*[@id="oauth2-authorize"]/div[3]/div[3]/form/input[1]', ], 'class_': oauth2.Yammer, 'scope': oauth2.Yammer.user_info_scope, 'user': { 'birth_date': BIRTH_DATE, 'city': conf.user_city, 'country': conf.user_country, 'email': conf.user_email, 'first_name': conf.user_first_name,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('yandex') CONFIG = { 'login_xpath': '//*[@id="login"]', 'password_xpath': '//*[@id="passwd"]', 'consent_xpaths': [ '/html/body/div[2]/div/div[2]/form/div[4]/div[2]/button', ], 'class_': oauth2.Yandex, 'scope': oauth2.Yandex.user_info_scope, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'first_name': None, 'gender': None, 'id': conf.user_id, 'last_name': None, 'link': None, 'locale': None, 'name': None, 'nickname': None, 'phone': None, 'picture': None, 'postal_code': None, 'timezone': None,
import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('twitter') CONFIG = { 'login_xpath': '//*[@id="username_or_email"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="allow"]', ], 'class_': oauth1.Twitter, 'user': { 'birth_date': None, 'city': conf.user_city, 'country': conf.user_country, 'email': None, 'gender': None, 'id': conf.user_id, 'first_name': None, 'last_name': None, 'link': conf.user_link, 'locale': conf.user_locale, 'name': conf.user_name, 'nickname': None, 'phone': None, 'picture': conf.user_picture, 'postal_code': None, 'timezone': None, 'username': conf.user_username,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('bitly') LINK = 'http://bitly.com/u/{0}'.format(conf.user_id) PICTURE = 'http://bitly.com/u/{0}.png'.format(conf.user_id) CONFIG = { 'pre_login_xpaths': [ '//*[@id="sign-in"]/div[3]/fieldset/label/a', ], 'login_xpath': '//*[@id="sign-in"]/div[2]/fieldset/label[1]/input', 'password_xpath': '//*[@id="sign-in"]/div[2]/fieldset/label[2]/input', 'consent_xpaths': [ '//*[@id="sign-in"]/div[2]/fieldset/input[2]', '//*[@id="oauth_access"]/form/button[1]', ], 'consent_wait_seconds': 1, 'class_': oauth2.Bitly, 'scope': oauth2.Bitly.user_info_scope, 'user': { 'id': conf.user_id, 'email': None, 'username': conf.user_username_reverse, 'name': conf.user_name, 'first_name': None, 'last_name': None, 'nickname': None,
# -*- coding: utf-8 -*- import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('reddit') CONFIG = { 'login_xpath': '//*[@id="user_login"]', 'password_xpath': '//*[@id="passwd_login"]', 'consent_xpaths': [ '/html/body/div[3]/div/div[2]/form/div/input[1]', ], 'consent_wait_seconds': 3, 'class_': oauth2.Reddit, 'scope': oauth2.Reddit.user_info_scope, 'access_headers': { 'User-Agent': ('Authomatic.py Automated Functional Tests'), }, 'user': { 'id': conf.user_id, 'email': None, 'username': conf.user_username, 'name': conf.user_username, 'first_name': None, 'last_name': None, 'nickname': None, 'birth_date': None, 'city': None, 'country': None, 'gender': None,
# -*- coding: utf-8 -*- import calendar import re import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('foursquare') CONFIG = { 'logout_url': 'https://foursquare.com/logout', 'login_xpath': '//*[@id="username"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [], 'class_': oauth2.Foursquare, 'scope': oauth2.Foursquare.user_info_scope, 'user': { 'birth_date': conf.user_birth_date_str, 'city': conf.user_city, 'country': conf.user_country, 'email': conf.user_email, 'first_name': conf.user_first_name, 'gender': conf.user_gender, 'id': conf.user_id, 'last_name': conf.user_last_name,
import re import fixtures from authomatic.providers import openid conf = fixtures.get_configuration('openid_verisignlabs') OPENID_IDENTIFIER = 'http://{0}.pip.verisignlabs.com/'.format(conf.user_login) CONFIG = { 'openid_identifier': OPENID_IDENTIFIER, 'logout_url': 'https://pip.verisignlabs.com/logout.do', 'login_xpath': '//*[@id="mainbody"]/form/table/tbody/tr[2]/td[2]/input', 'password_xpath': '//*[@id="mainbody"]/form/table/tbody/tr[3]/td[2]/input', 'consent_xpaths': [ '//*[@id="TrustAuthenticateExchange"]/div[2]/input[2]', ], 'alert_wait_seconds': 1, 'class_': openid.OpenID, 'user': { 'id': OPENID_IDENTIFIER, 'email': conf.user_email, 'username': None, 'name': conf.user_name, 'first_name': None, 'last_name': None, 'nickname': conf.user_nickname, 'birth_date': conf.user_birth_date_str, 'city': None, 'country': conf.user_country, 'gender': re.compile(r'^\w{1}$'),
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('paypal') CONFIG = { 'logout_url': 'https://www.paypal.com/sk/cgi-bin/webscr?cmd=_logout', 'class_': oauth2.PayPal, 'scope': oauth2.PayPal.user_info_scope, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'first_name': None, 'gender': None, 'id': None, 'last_name': None, 'link': None, 'locale': None, 'location': None, 'name': None, 'nickname': None, 'phone': None, 'picture': None, 'postal_code': None, 'timezone': None, 'username': None, },
# -*- coding: utf-8 -*- import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('flickr') CONFIG = { 'login_xpath': '//*[@id="login-username"]', 'password_xpath': '//*[@id="login-passwd"]', 'consent_xpaths': [ '//*[@id="permissions"]/form/div/input[1]', ], 'enter_after_login_input': True, 'before_password_input_wait': 1, 'consent_wait_seconds': 1, 'logout_url': 'https://login.yahoo.com/config/login?logout=1', 'class_': oauth1.Flickr, 'user_authorization_params': dict(perms='read'), 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'gender': None, 'id': conf.user_id, 'first_name': None, 'last_name': None, 'link': None, 'locale': None, 'location': None,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('eventbrite') CONFIG = { 'logout_url': 'https://www.eventbrite.com/logout', 'login_xpath': '//*[@id="login-email"]', 'password_xpath': '//*[@id="login-password"]', 'consent_xpaths': [ '//*[@id="access_choices_allow"]', ], 'before_login_enter_wait': 2, 'consent_wait_seconds': 2, 'class_': oauth2.Eventbrite, 'scope': oauth2.Eventbrite.user_info_scope, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': conf.user_email, 'first_name': conf.user_first_name, 'gender': None,
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('xero') CONFIG = { 'logout_url': 'https://my.xero.com/logout', 'login_xpath': '//*[@id="email"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="SelectedOrganisation_toggle"]', '//*[@id="SelectedOrganisation_suggestions"]/div/div', '//*[@id="ext-gen4"]' ], 'consent_wait_seconds': 5, 'after_consent_wait_seconds': 10, 'class_': oauth1.Xero, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': conf.user_email, 'gender': None, 'id': re.compile(r'\w{8}-\w{4}-\w{4}-\w{4}-\w{12}'), 'first_name': conf.user_first_name, 'last_name': conf.user_last_name, 'link': None, 'locale': None,
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('twitter') CONFIG = { 'login_xpath': '//*[@id="username_or_email"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [], 'class_': oauth1.Twitter, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'gender': None, 'id': conf.user_id, 'first_name': None, 'last_name': None, 'link': re.compile(r'^http://t.co/\w+$'), 'locale': re.compile(r'^\w{2}$'), 'location': conf.user_location, 'name': conf.user_name, 'nickname': None, 'phone': None, 'picture': re.compile(r'^http://\w+\.twimg\.com/profile_images/\d+/\w+.jpg$'), 'postal_code': None, 'timezone': None,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('yandex') CONFIG = { 'login_xpath': '//*[@id="login"]', 'password_xpath': '//*[@id="passwd"]', 'consent_xpaths': [ '/html/body/div[2]/div/div[2]/form/div[4]/div[2]/button', ], 'class_': oauth2.Yandex, 'scope': oauth2.Yandex.user_info_scope, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'first_name': None, 'gender': None, 'id': conf.user_id, 'last_name': None, 'link': None, 'locale': None, 'name': conf.user_username, 'nickname': None, 'phone': None, 'picture': None, 'postal_code': None, 'timezone': None,
import datetime import re import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('vk') BIRTH_DATE = datetime.datetime.strptime(conf.user_birth_date[:10], '%x') FORMATTED_DATE = datetime.datetime.strftime(BIRTH_DATE, '%d.%m.%Y') PICTURE = re.compile(r'http://[A-Za-z0-9]+\.vk\.me/[A-Za-z0-9-/]+\.jpg') CONFIG = { 'login_xpath': '//*[@id="box"]/div/input[5]', 'password_xpath': '//*[@id="box"]/div/input[6]', 'consent_xpaths': [ '//*[@id="install_allow"]', '//*[@id="install_allow"]', ], 'consent_wait_seconds': 4, 'class_': oauth2.VK, 'scope': oauth2.VK.user_info_scope, 'offline': True, 'user': { 'birth_date': conf.user_birth_date, 'city': conf.user_city, 'country': conf.user_country, 'email': None, 'first_name': conf.user_first_name,
import re import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('linkedin') CONFIG = { 'login_xpath': '//*[@id="session_key-oauth2SAuthorizeForm"]', 'password_xpath': '//*[@id="session_password-oauth2SAuthorizeForm"]', 'consent_xpaths': [], 'class_': oauth2.LinkedIn, 'scope': oauth2.LinkedIn.user_info_scope, 'user': { 'birth_date': None, 'city': None, 'country': conf.user_country, 'email': conf.user_email, 'first_name': conf.user_first_name, 'gender': None, 'id': conf.user_id, 'last_name': conf.user_last_name, # 'link': re.compile(r'^https://www\.linkedin\.com/in/\w+$'), 'link': re.compile(r'^https://www\.linkedin\.com/.*'), 'locale': None, 'location': re.compile(r'^\w{2}$'), 'name': conf.user_name, 'nickname': None,
# -*- coding: utf-8 -*- import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('meetup') LINK = 'http://www.meetup.com/members/{0}'.format(conf.user_id) PICTURE = re.compile(r'http://photos\d+.meetupstatic.com/photos/member/' r'\w/\d+/\w/\d+/member_\d+.jpeg') CONFIG = { 'logout_url': 'http://www.meetup.com/logout/', 'login_xpath': '//*[@id="email"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [], 'class_': oauth1.Meetup, 'user': { 'birth_date': None, 'city': conf.user_city, 'country': conf.user_country, 'email': None, 'gender': None, 'id': conf.user_id, 'first_name': None,
import datetime import re import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('vk') PICTURE = re.compile(r'http://[A-Za-z0-9]+\.vk\.me/[A-Za-z0-9-/]+\.jpg') CONFIG = { 'login_xpath': '//*[@id="box"]/div/input[6]', 'password_xpath': '//*[@id="box"]/div/input[7]', 'consent_xpaths': [ '//*[@id="install_allow"]', ], 'consent_wait_seconds': 4, 'class_': oauth2.VK, 'scope': oauth2.VK.user_info_scope, 'offline': True, 'user': { 'birth_date': conf.user_birth_date_str, 'city': re.compile('\d+'), 'country': re.compile('\d+'), 'email': None, 'first_name': conf.user_first_name, 'gender': re.compile('\d'), 'id': conf.user_id, 'last_name': conf.user_last_name,
import fixtures from authomatic.providers import openid conf = fixtures.get_configuration('openid_livejournal') OPENID_IDENTIFIER = 'http://{0}.livejournal.com/'.format(conf.user_login) CONFIG = { 'openid_identifier': OPENID_IDENTIFIER, 'pre_login_xpaths': [ '//*[@id="js"]/body/div[7]/header/span', '//*[@id="js"]/body/div[4]/header/div/nav[1]/ul[2]/li[1]/a', ], # 'login_url': 'http://www.livejournal.com/login.bml', 'login_xpath': '//*[@id="user"]', 'password_xpath': '//*[@id="lj_loginwidget_password"]', 'consent_xpaths': [ # '//*[@id="js"]/body/div[4]/div[2]/div/form/div[3]/div[2]/button', '//*[@id="js"]/body/div[4]/div[2]/div/div/form/table/tbody/tr/td/input[1]', ], 'class_': openid.OpenID, 'user': { 'id': OPENID_IDENTIFIER, 'email': None, 'username': None, 'name': None, 'first_name': None,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration("bitly") LINK = "http://bitly.com/u/{0}".format(conf.user_id) PICTURE = "http://bitly.com/u/{0}.png".format(conf.user_id) CONFIG = { "pre_login_xpaths": ['//*[@id="oauth_access"]/form/div/div[1]/a'], "login_xpath": '//*[@id="username"]', "password_xpath": '//*[@id="password"]', "consent_xpaths": ['//*[@id="oauth_access"]/form/button[1]'], "class_": oauth2.Bitly, "scope": oauth2.Bitly.user_info_scope, "user": { "id": conf.user_id, "email": None, "username": conf.user_username_reverse, "name": conf.user_name, "first_name": None, "last_name": None, "nickname": None, "birth_date": None, "city": None, "country": None, "gender": None, "link": LINK, "locale": None,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('deviantart') PICTURE = 'http://a.deviantart.net/avatars/p/e/{0}.jpg?1'\ .format(conf.user_username) CONFIG = { 'pre_login_xpaths': ['//*[@id="joinform"]/fieldset/small/a'], 'login_xpath': '//*[@id="username"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="terms_agree"]', '//*[@id="authorize_form"]/fieldset/div[2]/div[2]/a[1]', ], 'class_': oauth2.DeviantART, 'scope': oauth2.DeviantART.user_info_scope, 'user': { 'id': None, 'email': None, 'username': conf.user_username, 'name': conf.user_username, 'first_name': None, 'last_name': None, 'nickname': None,
# -*- coding: utf-8 -*- import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('xing') LINK = 'https://www.xing.com/profile/{0}'.format(conf.user_username) PICTURE = re.compile(r'https://www.xing.com/assets/frontend_minified/' r'img/users/\w+\.\d+x\d+.jpg') CONFIG = { 'logout_url': 'https://www.xing.com/app/user?op=logout', 'login_xpath': '//*[@id="login_form_username"]', 'password_xpath': '//*[@id="login_form_password"]', 'consent_xpaths': [ '//*[@id="oauth-container"]/div/div/div/form/input[5]', ], 'consent_wait_seconds': 3, 'class_': oauth1.Xing, 'user': { 'birth_date': conf.user_birth_date_str, 'city': re.compile(r'^[\w. -]+$'), 'country': re.compile(r'^\w{2}$'), 'email': conf.user_email, 'gender': re.compile(r'^\w$'), 'id': conf.user_id, 'first_name': conf.user_first_name,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('amazon') CONFIG = { 'login_xpath': '//*[@id="ap_email"]', 'password_xpath': '//*[@id="ap_password"]', 'consent_xpaths': [ '//*[@id="signInSubmit"]/span/button', '//*[@id="ap-oaconsent-agree-button"]/span/button', ], 'class_': oauth2.Amazon, 'scope': oauth2.Amazon.user_info_scope, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': conf.user_email, 'first_name': None, 'gender': None, 'id': conf.user_id, 'last_name': None, 'link': None, 'locale': None, 'name': conf.user_name,
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration("twitter") CONFIG = { "login_xpath": '//*[@id="username_or_email"]', "password_xpath": '//*[@id="password"]', "consent_xpaths": [], "class_": oauth1.Twitter, "user": { "birth_date": None, "city": None, "country": None, "email": None, "gender": None, "id": conf.user_id, "first_name": None, "last_name": None, "link": re.compile(r"^http://t.co/\w+$"), "locale": re.compile(r"^\w{2}$"), "location": conf.user_location, "name": conf.user_name, "nickname": None, "phone": None, "picture": re.compile(r"^http://\w+\.twimg\.com/profile_images/\d+/\w+.jpg$"), "postal_code": None, "timezone": None,
import datetime import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('windowslive') PICTURE = 'https://apis.live.net/v5.0/{0}/picture'.format(conf.user_id) CONFIG = { 'login_xpath': '//*[@id="i0116"]', 'password_xpath': '//*[@id="i0118"]', 'consent_xpaths': [ '//*[@id="idBtn_Accept"]', ], 'consent_wait_seconds': 0, 'class_': oauth2.WindowsLive, 'scope': oauth2.WindowsLive.user_info_scope, 'offline': True, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': conf.user_email,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('amazon') CONFIG = { 'login_xpath': '//*[@id="ap_email"]', 'password_xpath': '//*[@id="ap_password"]', 'consent_xpaths': [ '//*[@id="signInSubmit"]/span/button', '//*[@id="ap-oaconsent-agree-button"]/span/button', ], 'class_': oauth2.Amazon, 'scope': oauth2.Amazon.user_info_scope, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': conf.user_email, 'first_name': None, 'gender': None, 'id': conf.user_id, 'last_name': None, 'link': None, 'locale': None, 'name': conf.user_name, 'nickname': None, 'phone': None, 'picture': None,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('facebook') LINK = 'https://www.facebook.com/' + conf.user_username_reverse PICTURE = 'http://graph.facebook.com/{0}/picture?type=large'\ .format(conf.user_username_reverse) CONFIG = { 'login_xpath': '//*[@id="email"]', 'password_xpath': '//*[@id="pass"]', 'consent_xpaths': [ '//*[@id="platformDialogForm"]/div[2]/div/table/tbody/tr/td[2]/button[2]' ], 'class_': oauth2.Facebook, 'scope': oauth2.Facebook.user_info_scope, 'user': { 'id': conf.user_id, 'email': conf.user_email, 'username': conf.user_username_reverse, 'name': conf.user_name, 'first_name': conf.user_first_name, 'last_name': conf.user_last_name, 'nickname': None, 'birth_date': None, 'city': conf.user_city, 'country': conf.user_country, 'gender': conf.user_gender, 'link': LINK,
import re import fixtures import constants from authomatic.providers import openid conf = fixtures.get_configuration('openid_livejournal') CONFIG = { 'pre_login_xpaths': [ '//*[@id="js"]/body/div[6]/header/span', '//*[@id="js"]/body/div[4]/header/div/nav[1]/ul[2]/li[1]/a', ], 'login_xpath': '//*[@id="user"]', 'password_xpath': '//*[@id="lj_loginwidget_password"]', 'consent_xpaths': [ '//*[@id="js"]/body/div[4]/div[2]/div/form/div[3]/div[2]/button', '//*[@id="js"]/body/div[4]/div[2]/div/div/form/table/tbody/tr/td/input[1]', ], 'class_': openid.OpenID, 'user': { 'id': conf.user_id, 'email': None, 'username': None, 'name': None, 'first_name': None, 'last_name': None, 'nickname': None, 'birth_date': None, 'city': None, 'country': None,
import re import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('linkedin') CONFIG = { 'login_xpath': '//*[@id="session_key-oauth2SAuthorizeForm"]', 'password_xpath': '//*[@id="session_password-oauth2SAuthorizeForm"]', 'consent_xpaths': [], 'class_': oauth2.LinkedIn, 'scope': oauth2.LinkedIn.user_info_scope, 'user': { 'birth_date': None, 'city': None, 'country': conf.user_country, 'email': conf.user_email, 'first_name': conf.user_first_name, 'gender': None, 'id': conf.user_id, 'last_name': conf.user_last_name, # 'link': re.compile(r'^https://www\.linkedin\.com/in/\w+$'), 'link': re.compile(r'^https://www\.linkedin\.com/.*'), 'locale': None, 'location': re.compile(r'^\w{2}$'),
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('meetup') LINK = 'http://www.meetup.com/members/{0}'.format(conf.user_id) PICTURE = re.compile(r'http://photos\d+.meetupstatic.com/photos/member/' r'\w/\d+/\w/\d+/member_\d+.jpeg') CONFIG = { 'logout_url': 'http://www.meetup.com/logout/', 'login_xpath': '//*[@id="email"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [], 'class_': oauth1.Meetup, 'user': { 'birth_date': None, 'city': conf.user_city, 'country': conf.user_country, 'email': None, 'gender': None, 'id': conf.user_id, 'first_name': None, 'last_name': None, 'link': LINK, 'locale': conf.user_locale, 'location': conf.user_location, 'name': conf.user_name,
import re import fixtures import constants from authomatic.providers import openid conf = fixtures.get_configuration('openid_yahoo') CONFIG = { 'login_xpath': '//*[@id="login-username"]', 'password_xpath': '//*[@id="login-passwd"]', 'consent_xpaths': [ '//*[@id="login-signin"]' ], 'class_': openid.OpenID, 'user': { 'id': conf.user_id, 'email': conf.user_email, 'username': None, 'name': conf.user_name, 'first_name': None, 'last_name': None, 'nickname': None, 'birth_date': None, 'city': None, 'country': None, 'gender': None, 'link': None, 'locale': None, 'phone': None, 'picture': None,
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('vimeo') LINK = 'http://vimeo.com/user{0}'.format(conf.user_id) PICTURE = re.compile(r'http://\w+.vimeocdn.com/portrait/\d+_300x300.jpg') CONFIG = { 'logout_url': 'https://vimeo.com/log_out', 'login_xpath': '//*[@id="email"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="security"]/form/input[4]', ], 'class_': oauth1.Vimeo, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': None, 'gender': None, 'id': conf.user_id, 'first_name': None, 'last_name': None, 'link': LINK, 'locale': None, 'location': conf.user_location,
import re import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('plurk') LINK = 'http://www.plurk.com/{0}/'.format(conf.user_username) PICTURE = 'http://avatars.plurk.com/{0}-big2.jpg'.format(conf.user_id) CONFIG = { 'login_xpath': '//*[@id="input_nick_name"]', 'password_xpath': '//*[@id="password"]/input', 'consent_xpaths': [ '//*[@id="display_board"]/div[2]/div/form/input[5]', ], 'consent_wait_seconds': 5, 'class_': oauth1.Plurk, 'user': { 'birth_date': conf.user_birth_date_str, 'city': conf.user_city, 'country': conf.user_country, 'email': conf.user_email, 'gender': re.compile(r'^\d$'), 'id': conf.user_id, 'first_name': None, 'last_name': None, 'link': LINK, 'locale': re.compile(r'^\w{2}$'),
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('bitly') LINK = 'http://bitly.com/u/{0}'.format(conf.user_id) PICTURE = 'http://bitly.com/u/{0}.png'.format(conf.user_id) CONFIG = { 'class_': oauth2.Bitly, 'scope': oauth2.Bitly.user_info_scope, 'fixture': fixtures.providers.BitlyFixture(conf.user_login, conf.user_password), 'user': { 'id': conf.user_id, 'email': None, 'username': conf.user_username_reverse, 'name': conf.user_name, 'first_name': None, 'last_name': None, 'nickname': None, 'birth_date': None, 'city': None, 'country': None, 'gender': None, 'link': LINK, 'locale': None, 'phone': None, 'picture': PICTURE,
import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('eventbrite') CONFIG = { 'logout_url': 'https://www.eventbrite.com/logout', 'login_xpath': '//*[@id="login-email"]', 'password_xpath': '//*[@id="login-password"]', 'consent_xpaths': [ '//*[@id="access_choices_allow"]', ], 'before_login_enter_wait': 2, 'consent_wait_seconds': 2, 'class_': oauth2.Eventbrite, 'scope': oauth2.Eventbrite.user_info_scope, 'user': { 'birth_date': None, 'city': None, 'country': None, 'email': conf.user_email, 'first_name': conf.user_first_name, 'gender': None, 'id': conf.user_id, 'last_name': conf.user_last_name, 'link': None, 'locale': None, 'location': None, 'name': conf.user_name, 'nickname': None,
# -*- coding: utf-8 -*- import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('deviantart') PICTURE = 'http://a.deviantart.net/avatars/p/e/{0}.jpg?1'\ .format(conf.user_username) CONFIG = { 'pre_login_xpaths': [ '//*[@id="joinform"]/fieldset/small/a' ], 'login_xpath': '//*[@id="username"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="terms_agree"]', '//*[@id="authorize_form"]/fieldset/div[2]/div[2]/a[1]', ], # 'consent_wait_seconds': 2, 'access_headers': { 'User-Agent': 'Authomatic.py Automated Functional Tests', }, 'class_': oauth2.DeviantART, 'scope': oauth2.DeviantART.user_info_scope, 'user': { 'id': None, 'email': None, 'username': conf.user_username,
from datetime import datetime import fixtures import constants from authomatic.providers import oauth2 conf = fixtures.get_configuration('yammer') LINK = 'https://www.yammer.com/peterhudec.com/users/{}'\ .format(conf.user_username) # Yammer allows users to only set month and day of their birth day. # The year is always 1900. BD = datetime.strptime(conf.user_birth_date, '%x') BIRTH_DATE = datetime(1900, BD.month, BD.day).strftime('%x') CONFIG = { 'login_xpath': '//*[@id="login"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="login-form"]/fieldset[2]/p[2]/button', '//*[@id="oauth2-authorize"]/div[3]/div[3]/form/input[1]', ], 'class_': oauth2.Yammer, 'scope': oauth2.Yammer.user_info_scope, 'user': { 'birth_date': BIRTH_DATE,