diff options
author | Sean Dague <sean@dague.net> | 2014-11-07 14:27:03 +0100 |
---|---|---|
committer | Sean Dague <sean@dague.net> | 2014-11-12 15:31:08 -0500 |
commit | 89cd6a0c493e26b5a9e017c99d731464292abbaf (patch) | |
tree | c2bf790d1684cd539b820247113492495123a163 /nova/tests/console/test_type.py | |
parent | 5c8bbaafef590e4d346a03051a0ba55c8be26c5c (diff) | |
download | nova-89cd6a0c493e26b5a9e017c99d731464292abbaf.tar.gz |
move all tests to nova/tests/unit
As part of the split of functional and unit tests we need to isolate
the unit tests into a separate directory for having multiple test
targets in a sane way.
Part of bp:functional-tests-for-nova
Change-Id: Id42ba373c1bda6a312b673ab2b489ca56da8c628
Diffstat (limited to 'nova/tests/console/test_type.py')
-rw-r--r-- | nova/tests/console/test_type.py | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/nova/tests/console/test_type.py b/nova/tests/console/test_type.py deleted file mode 100644 index d9a82d7658..0000000000 --- a/nova/tests/console/test_type.py +++ /dev/null @@ -1,61 +0,0 @@ -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -from nova.console import type as ctype -from nova import test - - -class TypeTestCase(test.TestCase): - def test_console(self): - c = ctype.Console(host='127.0.0.1', port=8945) - - self.assertTrue(hasattr(c, 'host')) - self.assertTrue(hasattr(c, 'port')) - self.assertTrue(hasattr(c, 'internal_access_path')) - - self.assertEqual('127.0.0.1', c.host) - self.assertEqual(8945, c.port) - self.assertIsNone(c.internal_access_path) - - self.assertEqual({ - 'host': '127.0.0.1', - 'port': 8945, - 'internal_access_path': None, - 'token': 'a-token', - 'access_url': 'an-url'}, - c.get_connection_info('a-token', 'an-url')) - - def test_console_vnc(self): - c = ctype.ConsoleVNC(host='127.0.0.1', port=8945) - - self.assertIsInstance(c, ctype.Console) - - def test_console_rdp(self): - c = ctype.ConsoleRDP(host='127.0.0.1', port=8945) - - self.assertIsInstance(c, ctype.Console) - - def test_console_spice(self): - c = ctype.ConsoleSpice(host='127.0.0.1', port=8945, tlsPort=6547) - - self.assertIsInstance(c, ctype.Console) - self.assertEqual(6547, c.tlsPort) - self.assertEqual( - 6547, c.get_connection_info('a-token', 'an-url')['tlsPort']) - - def test_console_serial(self): - c = ctype.ConsoleSerial(host='127.0.0.1', port=8945) - - self.assertIsInstance(c, ctype.Console) |