Created
April 13, 2015 14:44
-
-
Save anonymous/d2e22dce9b21aead4c3c to your computer and use it in GitHub Desktop.
This file contains 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
from django.core.urlresolvers import reverse | |
from django import http | |
from django.utils.six.moves.urllib.parse import urlsplit # noqa | |
from mox import IsA # noqa | |
from openstack_dashboard import api | |
from openstack_dashboard.test import helpers as test | |
INDEX_URL = reverse('horizon:settings:api_keys:index') | |
class ApiKeyTests(test.TestCase): | |
"""We might have to create a setUp() where we create the default panel | |
as for some reason it isn't created when this test runs. Could also be | |
that our API Key Panel isn't doing the right thing but that seems less | |
likely. | |
""" | |
@test.create_stubs({api.keystone: ('user_update', )}) | |
def test_change_password(self): | |
api.keystone.user_update(IsA(http.HttpRequest), | |
'normalpwd',).AndReturn(None) | |
self.mox.ReplayAll() | |
formData = {'method': 'ResetAPIKeyForm'} | |
res = self.client.post(INDEX_URL, formData) | |
self.assertNoFormErrors(res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment