Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pass timeout value to restmail

  • Loading branch information...
commit d1b065905c1db2b55f7e9ec26b42870d25536ea9 1 parent 0ad877c
@davehunt authored
View
2  tests/webdriver/base.py
@@ -36,7 +36,7 @@ def create_verified_user(self, selenium, timeout):
from ...pages.webdriver.sign_in import SignIn
signin = SignIn(selenium, timeout, expect='new')
signin.sign_in_new_user(user.primary_email, user.password)
- mail = restmail.get_mail(user.id)
+ mail = restmail.get_mail(user.primary_email, timeout=timeout)
verify_url = re.search(BrowserID.VERIFY_URL_REGEX,
mail[0]['text']).group(0)
View
3  tests/webdriver/check_change_password.py
@@ -16,8 +16,7 @@ class TestSignIn(BaseTest):
@pytest.mark.travis
def test_change_password(self, mozwebqa):
- user = self.create_verified_user(mozwebqa.selenium,
- mozwebqa.timeout)
+ user = self.create_verified_user(mozwebqa.selenium, mozwebqa.timeout)
mozwebqa.selenium.get(self.browserid_url(mozwebqa.base_url))
from ...pages.webdriver.account_manager import AccountManager
View
4 tests/webdriver/check_reset_password.py
@@ -37,7 +37,9 @@ def test_reset_password(self, mozwebqa):
signin.close_window()
signin.switch_to_main_window()
- mail = restmail.get_mail(user.id, message_count=2)
+ mail = restmail.get_mail(user.primary_email,
+ message_count=2,
+ timeout=mozwebqa.timeout)
assert 'Click to reset your password' in mail[1]['text']
reset_url = re.search(BrowserID.RESET_URL_REGEX,
View
19 tests/webdriver/check_sign_in.py
@@ -43,28 +43,25 @@ def test_sign_in_new_user_helper(self, mozwebqa):
signin = SignIn(mozwebqa.selenium, mozwebqa.timeout, expect='new')
print 'signing in as %s' % user.primary_email
signin.sign_in_new_user(user.primary_email, 'password')
- mail = restmail.get_mail(user.id)
+ mail = restmail.get_mail(user.primary_email, timeout=mozwebqa.timeout)
assert 'Click to confirm this email address' in mail[0]['text']
@pytest.mark.travis
def test_sign_in_new_user(self, mozwebqa):
- restmail_username = 'bidpom_%s' % uuid.uuid1()
- email = '%s@restmail.net' % restmail_username
- password = 'password'
-
+ user = MockUser()
from ...pages.webdriver.sign_in import SignIn
signin = SignIn(mozwebqa.selenium, mozwebqa.timeout, expect='new')
- print 'signing in as %s' % email
- signin.email = email
+ print 'signing in as %s' % user.primary_email
+ signin.email = user.primary_email
signin.click_next(expect='verify')
- signin.password = password
- signin.verify_password = password
+ signin.password = user.password
+ signin.verify_password = user.password
signin.click_verify_email()
- assert signin.check_email_at_address == email
+ assert signin.check_email_at_address == user.primary_email
signin.close_window()
signin.switch_to_main_window()
- mail = restmail.get_mail(restmail_username)
+ mail = restmail.get_mail(user.primary_email, timeout=mozwebqa.timeout)
assert 'Click to confirm this email address' in mail[0]['text']
@pytest.mark.travis
Please sign in to comment.
Something went wrong with that request. Please try again.