From cda1d46073eac16a2f110f8bc5c5261aff77c716 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Mon, 16 Nov 2020 15:15:24 -0600 Subject: [PATCH] #1378 fixed analysis/flake8 tests --- tests/CLI/modules/config_tests.py | 10 +++++----- tests/CLI/modules/vs/vs_create_tests.py | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/CLI/modules/config_tests.py b/tests/CLI/modules/config_tests.py index ec018a53c..33c82520a 100644 --- a/tests/CLI/modules/config_tests.py +++ b/tests/CLI/modules/config_tests.py @@ -67,13 +67,13 @@ def test_setup(self, mocked_input, getpass, confirm_mock, client): result = self.run_command(['--config=%s' % config_file.name, 'config', 'setup']) self.assert_no_fail(result) - self.assertTrue('Configuration Updated Successfully' in result.output) + self.assertIn('Configuration Updated Successfully', result.output) contents = config_file.read().decode("utf-8") - self.assertTrue('[softlayer]' in contents) - self.assertTrue('username = user' in contents) - self.assertTrue('api_key = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' in contents) - self.assertTrue('endpoint_url = %s' % consts.API_PUBLIC_ENDPOINT in contents) + self.assertIn('[softlayer]', contents) + self.assertIn('username = user', contents) + self.assertIn('api_key = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', contents) + self.assertIn('endpoint_url = %s' % consts.API_PUBLIC_ENDPOINT, contents) @mock.patch('SoftLayer.Client') @mock.patch('SoftLayer.CLI.formatting.confirm') diff --git a/tests/CLI/modules/vs/vs_create_tests.py b/tests/CLI/modules/vs/vs_create_tests.py index 413bb6c18..53c3bdc97 100644 --- a/tests/CLI/modules/vs/vs_create_tests.py +++ b/tests/CLI/modules/vs/vs_create_tests.py @@ -666,8 +666,7 @@ def test_create_vs_export(self): '--domain', 'TESTING', '--flavor', 'B1_2X8X25', '--datacenter', 'TEST00', '--os', 'UBUNTU_LATEST']) self.assert_no_fail(result) - self.assertTrue('Successfully exported options to a template file.' - in result.output) + self.assertIn('Successfully exported options to a template file.', result.output) contents = config_file.read().decode("utf-8") self.assertIn('hostname=TEST', contents) self.assertIn('flavor=B1_2X8X25', contents)