Created
January 16, 2015 21:08
-
-
Save julianvargasalvarez/eae927dd02700c7c3e5c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_when_a_user_with_inactive_account_login_the_body_show_correctly_a_error_message(self): | |
RegistrationProfile.objects.create_inactive_user("jefree", "[email protected]", "1234", "", False) | |
self.selenium.get('%s%s' % (self.live_server_url, '/accounts/login/')) | |
username_input = self.selenium.find_element_by_name("username") | |
username_input.send_keys('jefree') | |
password_input = self.selenium.find_element_by_name("password") | |
password_input.send_keys('1234') | |
self.selenium.find_element_by_xpath('//input[@value="Log in"]').click() | |
body = self.selenium.find_element_by_tag_name('body') | |
self.assertIn("This account is inactive", body.text) | |
self.assertNotIn("__all__", body.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment