

@test.create_stubs({
    api.keystone: ('tenant_list', 'user_get', 'domain_get'),
})
def test_update_user_with_passwords_not_matching(self):
    api.keystone.user_get(IsA(http.HttpRequest), '1', admin=True).AndReturn(self.user)
    api.keystone.domain_get(IsA(http.HttpRequest), '1').AndReturn(self.domain)
    api.keystone.tenant_list(IgnoreArg(), domain=self.user.domain_id, user=self.user.id).AndReturn([body.tenants.list(), False])
    self.mox.ReplayAll()
    self.selenium.get(('%s%s' % (self.live_server_url, USER_UPDATE_URL)))
    body = self.selenium.find_element_by_tag_name('body')
    self.assertFalse(('Passwords do not match' in body.text), 'Error message should not be visible at loading time')
    self.selenium.find_element_by_id('id_password').send_keys('test')
    self.selenium.find_element_by_id('id_confirm_password').send_keys('te')
    self.selenium.find_element_by_id('id_email').clear()
    body = self.selenium.find_element_by_tag_name('body')
    self.assertTrue(('Passwords do not match' in body.text), 'Error message not found in body')

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/dashboards/identity/users/tests.py SeleniumTests.test_update_user_with_passwords_not_matching/VarMisuse@113/150 `self`->`body`