def test_credential_limits(self):
    config_fixture_ = self.user = self.useFixture(config_fixture.Config())
    config_fixture_.config(group='credential', user_limit=4)
    self._create_credential_with_user_id(self.user_foo['id'])
    self.assertRaises(exception.CredentialLimitExceeded, self._create_credential_with_user_id, self.user_foo['id'])
def test_credential_limits(self):
    config_fixture_ = self.user = self.useFixture(config_fixture.Config())
    config_fixture_.config(group='credential', user_limit=4)
    self._create_credential_with_user_id(self.user_foo['id'])
    self.assertRaises(exception.CredentialLimitExceeded, self._create_credential_with_user_id, self.user_foo['id'])