Permalink
Browse files

Add admin login steps before adding application in openstax/accounts

  • Loading branch information...
1 parent 4872c0d commit e21a098c64d9b3e706b83eb5fce16427c0d5a553 @karenc committed Mar 12, 2014
Showing with 8 additions and 0 deletions.
  1. +8 −0 openstax_accounts/tests.py
@@ -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()

0 comments on commit e21a098

Please sign in to comment.