-from snaps.openstack.create_keypairs import KeypairSettings, OpenStackKeypair
+from snaps.openstack.create_keypairs import (
+ KeypairSettings, OpenStackKeypair, KeypairSettingsError)
from snaps.openstack.tests.os_source_file_test import OSIntegrationTestCase
from snaps.openstack.utils import nova_utils
from snaps.openstack.tests.os_source_file_test import OSIntegrationTestCase
from snaps.openstack.utils import nova_utils
def test_config_all(self):
settings = KeypairSettings(
**{'name': 'foo', 'public_filepath': '/foo/bar.pub',
def test_config_all(self):
settings = KeypairSettings(
**{'name': 'foo', 'public_filepath': '/foo/bar.pub',
self.assertEqual('foo', settings.name)
self.assertEqual('/foo/bar.pub', settings.public_filepath)
self.assertEqual('/foo/bar', settings.private_filepath)
self.assertEqual('foo', settings.name)
self.assertEqual('/foo/bar.pub', settings.public_filepath)
self.assertEqual('/foo/bar', settings.private_filepath)