Created
January 26, 2012 23:32
-
-
Save gabrielhurley/1685843 to your computer and use it in GitHub Desktop.
This tests itself.
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
def test_tenant_create(self): | |
kwargs = {'id': TEST_TENANT_ID, | |
'description': 'aDescription', | |
"enabled": True} | |
tenant = keystoneclient_tenants.Tenant(self.request, kwargs) | |
keystoneclient = self.stub_keystoneclient() | |
keystoneclient.tenants = self.mox.CreateMockAnything() | |
keystoneclient.tenants.create(*kwargs.values()).AndReturn(tenant) | |
self.mox.ReplayAll() | |
ret_val = api.tenant_create(self.request, *kwargs.values()) | |
for key, val in kwargs.items(): | |
self.assertEqual(val, getattr(ret_val, key)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment