Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add admin login steps before adding application in openstax/accounts

  • Loading branch information...
commit e21a098c64d9b3e706b83eb5fce16427c0d5a553 1 parent 4872c0d
Karen Chan authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 openstax_accounts/tests.py
8 openstax_accounts/tests.py
View
@@ -42,6 +42,14 @@ def setUpClass(cls):
cls.app_url = cls.config.get('app:main', 'openstax_accounts.application_url')
cls.accounts_url = cls.config.get('app:main', 'openstax_accounts.server_url')
+ admin_login = cls.config.get('app:main', 'openstax_accounts.admin_login')
+ admin_password = cls.config.get('app:main', 'openstax_accounts.admin_password')
+
+ # login as admin in openstax/accounts
+ cls.driver.get(urlparse.urljoin(cls.accounts_url, '/login'))
+ cls.class_fill_in('Username', admin_login)
+ cls.class_fill_in('Password', admin_password)
+ cls.driver.find_element_by_xpath('//button[text()="Sign in"]').click()
# register our app with openstax/accounts
cls.driver.get(urlparse.urljoin(cls.accounts_url, '/oauth/applications'))
cls.driver.find_element_by_link_text('New Application').click()
Please sign in to comment.
Something went wrong with that request. Please try again.