websauna.tests.user.test_facebook module

Facebook login tests.

To run:

FACEBOOK_USER="[email protected]" FACEBOOK_PASSWORD="y" py.test websauna -s --splinter-webdriver=firefox --splinter-make-screenshot-on-failure=false --ini=test.ini -k test_facebook
websauna.tests.user.test_facebook.FACEBOOK_LOGIN_TEST_CSS = '#pageFooter'

Selector we use to detect if we are on the Facebook login page

websauna.tests.user.test_facebook.do_facebook_login(browser)[source]

Splinter yourself in to the Facebook app.

websauna.tests.user.test_facebook.do_facebook_login_if_facebook_didnt_log_us_already(browser)[source]

Facebook doesn’t give us login dialog again as the time is so short, or Authomatic does some caching here?.

websauna.tests.user.test_facebook.facebook_app(request)[source]

Construct a WSGI app with tutorial models and admins loaded.

websauna.tests.user.test_facebook.test_facebook_first_login(web_server, browser, dbsession)[source]

Login an user.

websauna.tests.user.test_facebook.test_facebook_login_disabled_user(web_server, browser, dbsession, init)[source]

Logged in user which is not enabled should give an error..

websauna.tests.user.test_facebook.test_facebook_second_login(web_server, browser, dbsession)[source]

Login second time through Facebook and see our first_login flag is unset.

websauna.tests.user.test_facebook.web_server(request, facebook_app)[source]

Run a web server with Facebook login settings.