Remove unnecessary testing code
Now PrettyTable >= 0.7.2 in requirements.txt, remove code for PrettyTable < 0.7.2. Change-Id: Ie6edcc24fbb67394ff8abe0c5f18ad2bed6903ab Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This commit is contained in:
parent
d4ea897bc9
commit
2af1d0c514
|
@ -12,7 +12,6 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import distutils.version as dist_version
|
|
||||||
import io
|
import io
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
@ -21,7 +20,6 @@ from unittest import mock
|
||||||
import ddt
|
import ddt
|
||||||
import fixtures
|
import fixtures
|
||||||
from keystoneauth1 import fixture
|
from keystoneauth1 import fixture
|
||||||
import prettytable
|
|
||||||
import requests_mock
|
import requests_mock
|
||||||
from testtools import matchers
|
from testtools import matchers
|
||||||
|
|
||||||
|
@ -583,13 +581,6 @@ class ShellTest(utils.TestCase):
|
||||||
def test_password(self, mock_getpass, mock_stdin, m_requests):
|
def test_password(self, mock_getpass, mock_stdin, m_requests):
|
||||||
mock_stdin.encoding = "utf-8"
|
mock_stdin.encoding = "utf-8"
|
||||||
|
|
||||||
# default output of empty tables differs depending between prettytable
|
|
||||||
# versions
|
|
||||||
if (hasattr(prettytable, '__version__') and
|
|
||||||
dist_version.StrictVersion(prettytable.__version__) <
|
|
||||||
dist_version.StrictVersion('0.7.2')):
|
|
||||||
ex = '\n'
|
|
||||||
else:
|
|
||||||
ex = '\n'.join([
|
ex = '\n'.join([
|
||||||
'+----+------+--------+------------+-------------+----------+',
|
'+----+------+--------+------------+-------------+----------+',
|
||||||
'| ID | Name | Status | Task State | Power State | Networks |',
|
'| ID | Name | Status | Task State | Power State | Networks |',
|
||||||
|
|
Loading…
Reference in New Issue