Skip to content

Commit 29bf434

Browse files
Merge pull request #1381 from allmightyspiff/issues1378
fixed analysis/flake8 tests
2 parents ff4887e + cda1d46 commit 29bf434

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

tests/CLI/modules/config_tests.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ def test_setup(self, mocked_input, getpass, confirm_mock, client):
6767
result = self.run_command(['--config=%s' % config_file.name, 'config', 'setup'])
6868

6969
self.assert_no_fail(result)
70-
self.assertTrue('Configuration Updated Successfully' in result.output)
70+
self.assertIn('Configuration Updated Successfully', result.output)
7171
contents = config_file.read().decode("utf-8")
7272

73-
self.assertTrue('[softlayer]' in contents)
74-
self.assertTrue('username = user' in contents)
75-
self.assertTrue('api_key = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' in contents)
76-
self.assertTrue('endpoint_url = %s' % consts.API_PUBLIC_ENDPOINT in contents)
73+
self.assertIn('[softlayer]', contents)
74+
self.assertIn('username = user', contents)
75+
self.assertIn('api_key = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', contents)
76+
self.assertIn('endpoint_url = %s' % consts.API_PUBLIC_ENDPOINT, contents)
7777

7878
@mock.patch('SoftLayer.Client')
7979
@mock.patch('SoftLayer.CLI.formatting.confirm')

tests/CLI/modules/vs/vs_create_tests.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,7 @@ def test_create_vs_export(self):
666666
'--domain', 'TESTING', '--flavor', 'B1_2X8X25',
667667
'--datacenter', 'TEST00', '--os', 'UBUNTU_LATEST'])
668668
self.assert_no_fail(result)
669-
self.assertTrue('Successfully exported options to a template file.'
670-
in result.output)
669+
self.assertIn('Successfully exported options to a template file.', result.output)
671670
contents = config_file.read().decode("utf-8")
672671
self.assertIn('hostname=TEST', contents)
673672
self.assertIn('flavor=B1_2X8X25', contents)

0 commit comments

Comments
 (0)