コード例 #1
0
ファイル: test_base.py プロジェクト: zestrada/libcloud
 def test_get_auth_default_password(self):
     n = NodeDriver('foo')
     n.features = {'create_node': ['password']}
     auth = n._get_and_check_auth(None)
     self.assertTrue(isinstance(auth, NodeAuthPassword))
コード例 #2
0
ファイル: test_base.py プロジェクト: zestrada/libcloud
 def test_get_auth_default_no_feature(self):
     n = NodeDriver('foo')
     self.assertEqual(None, n._get_and_check_auth(None))
コード例 #3
0
ファイル: test_base.py プロジェクト: zestrada/libcloud
 def test_get_auth_password(self):
     n = NodeDriver('foo')
     n.features = {'create_node': ['password']}
     auth = NodeAuthPassword('password')
     self.assertEqual(auth, n._get_and_check_auth(auth))
コード例 #4
0
ファイル: test_base.py プロジェクト: zestrada/libcloud
 def test_get_auth_default_ssh_key(self):
     n = NodeDriver('foo')
     n.features = {'create_node': ['ssh_key']}
     self.assertEqual(None, n._get_and_check_auth(None))
コード例 #5
0
ファイル: test_base.py プロジェクト: zestrada/libcloud
 def test_get_auth_ssh(self):
     n = NodeDriver('foo')
     n.features = {'create_node': ['ssh_key']}
     auth = NodeAuthSSHKey('pubkey...')
     self.assertEqual(auth, n._get_and_check_auth(auth))
コード例 #6
0
ファイル: test_base.py プロジェクト: wandera/libcloud
 def test_get_auth_default_password(self):
     n = NodeDriver("foo")
     n.features = {"create_node": ["password"]}
     auth = n._get_and_check_auth(None)
     self.assertTrue(isinstance(auth, NodeAuthPassword))
コード例 #7
0
ファイル: test_base.py プロジェクト: wandera/libcloud
 def test_get_auth_default_ssh_key(self):
     n = NodeDriver("foo")
     n.features = {"create_node": ["ssh_key"]}
     self.assertEqual(None, n._get_and_check_auth(None))
コード例 #8
0
ファイル: test_base.py プロジェクト: wandera/libcloud
 def test_get_auth_password(self):
     n = NodeDriver("foo")
     n.features = {"create_node": ["password"]}
     auth = NodeAuthPassword("password")
     self.assertEqual(auth, n._get_and_check_auth(auth))
コード例 #9
0
ファイル: test_base.py プロジェクト: wandera/libcloud
 def test_get_auth_ssh(self):
     n = NodeDriver("foo")
     n.features = {"create_node": ["ssh_key"]}
     auth = NodeAuthSSHKey("pubkey...")
     self.assertEqual(auth, n._get_and_check_auth(auth))