@unittest.skipUnless(1 >= django.VERSION[0] and django.VERSION[1] >= 6,
                         "'HttpResponseRedirect' object has no attribute "
                         "'url' prior to Django 1.6")
    @test.create_stubs({api.keystone: ('user_update_own_password', )})
    def test_change_password_sets_logout_reason(self):
        api.keystone.user_update_own_password(IsA(http.HttpRequest),
                                              'oldpwd',
                                              'normalpwd').AndReturn(None)
        self.mox.ReplayAll()

        formData = {'method': 'PasswordForm',
                    'current_password': 'oldpwd',
                    'new_password': 'normalpwd',
                    'confirm_password': 'normalpwd'}
        res = self.client.post(INDEX_URL, formData, follow=False)

        self.assertRedirectsNoFollow(res, settings.LOGOUT_URL)
        self.assertIn('logout_reason', res.cookies)
        self.assertEqual(res.cookies['logout_reason'].value,
                         "Password changed. Please log in again to continue.")
        scheme, netloc, path, query, fragment = urlsplit(res.url)
        redirect_response = res.client.get(path, http.QueryDict(query))
        self.assertRedirectsNoFollow(redirect_response, settings.LOGIN_URL)
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/dashboards/settings/password/tests.py/ChangePasswordTests.test_change_password_sets_logout_reason/swapped operands of `>=`