summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Beaver <michaelbeaver64@gmail.com>2019-02-14 20:52:38 -0600
committerMichael Beaver <michaelbeaver64@gmail.com>2019-02-14 20:52:38 -0600
commit7f26bbcd59f97ab090516fe732912ebe7851eb30 (patch)
tree6b5b126aa21515e58bcd992d9a289e86aadd9213
parentaa90e5c17e8f37d0276df8bf64e5aae1ba261088 (diff)
Fix pep8 errorsHEADmaster
This addresses the pep8 errors that are causing gate failures Change-Id: Id92dbbf527af1953026f17ddb3f2d79f0a635284
Notes
Notes (review): Code-Review+1: Drew Walters <drewwalters96@gmail.com> Code-Review+1: Nishant Kumar <nishant.e.kumar@ericsson.com> Code-Review+1: Vladyslav Drok <vdrok@mirantis.com> Code-Review+2: Sean Eagan <sean.eagan@att.com> Code-Review+2: Scott Hussey <sthussey@att.com> Workflow+1: Scott Hussey <sthussey@att.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 18 Feb 2019 22:24:36 +0000 Reviewed-on: https://review.openstack.org/637116 Project: openstack/airship-armada Branch: refs/heads/master
-rw-r--r--armada/api/controller/versions.py7
-rw-r--r--armada/tests/unit/handlers/test_armada.py6
-rw-r--r--armada/tests/unit/handlers/test_wait.py23
3 files changed, 14 insertions, 22 deletions
diff --git a/armada/api/controller/versions.py b/armada/api/controller/versions.py
index 25ec170..a8e156b 100644
--- a/armada/api/controller/versions.py
+++ b/armada/api/controller/versions.py
@@ -27,10 +27,9 @@ class Versions(api.BaseResource):
27 27
28 def on_get(self, req, resp): 28 def on_get(self, req, resp):
29 resp.status = falcon.HTTP_200 29 resp.status = falcon.HTTP_200
30 resp.body = json.dumps({ 30 resp.body = json.dumps(
31 'v1.0': { 31 {'v1.0': {
32 'path': '/api/v1.0', 32 'path': '/api/v1.0',
33 'status': 'stable' 33 'status': 'stable'
34 } 34 }})
35 })
36 resp.content_type = 'application/json' 35 resp.content_type = 'application/json'
diff --git a/armada/tests/unit/handlers/test_armada.py b/armada/tests/unit/handlers/test_armada.py
index 2be3068..b2c8325 100644
--- a/armada/tests/unit/handlers/test_armada.py
+++ b/armada/tests/unit/handlers/test_armada.py
@@ -356,8 +356,10 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
356 if test_failure_to_run: 356 if test_failure_to_run:
357 357
358 def fail(tiller, release, timeout=None, cleanup=False): 358 def fail(tiller, release, timeout=None, cleanup=False):
359 status = AttrDict( 359 status = AttrDict(**{
360 **{'info': AttrDict(**{'Description': 'Failed'})}) 360 'info':
361 AttrDict(**{'Description': 'Failed'})
362 })
361 raise tiller_exceptions.ReleaseException( 363 raise tiller_exceptions.ReleaseException(
362 release, status, 'Test') 364 release, status, 'Test')
363 365
diff --git a/armada/tests/unit/handlers/test_wait.py b/armada/tests/unit/handlers/test_wait.py
index cc2db38..b64a437 100644
--- a/armada/tests/unit/handlers/test_wait.py
+++ b/armada/tests/unit/handlers/test_wait.py
@@ -170,15 +170,14 @@ class ChartWaitTestCase(base.ArmadaTestCase):
170 170
171 get_resource_wait.side_effect = return_mock 171 get_resource_wait.side_effect = return_mock
172 172
173 unit = self.get_unit({ 173 unit = self.get_unit(
174 'wait': { 174 {'wait': {
175 'resources': [{ 175 'resources': [{
176 'type': 'foo' 176 'type': 'foo'
177 }, { 177 }, {
178 'type': 'bar' 178 'type': 'bar'
179 }] 179 }]
180 } 180 }})
181 })
182 181
183 unit.wait(10) 182 unit.wait(10)
184 183
@@ -205,20 +204,12 @@ class PodWaitTestCase(base.ArmadaTestCase):
205 'key': 'value', 204 'key': 'value',
206 'helm.sh/hook': 'test-success' 205 'helm.sh/hook': 'test-success'
207 }), 206 }),
208 mock_resource({ 207 mock_resource({'helm.sh/hook': 'test-failure'}),
209 'helm.sh/hook': 'test-failure' 208 mock_resource({'helm.sh/hook': 'test-success,pre-install'})
210 }),
211 mock_resource({
212 'helm.sh/hook': 'test-success,pre-install'
213 })
214 ] 209 ]
215 non_test_resources = [ 210 non_test_resources = [
216 mock_resource({ 211 mock_resource({'helm.sh/hook': 'pre-install'}),
217 'helm.sh/hook': 'pre-install' 212 mock_resource({'key': 'value'}),
218 }),
219 mock_resource({
220 'key': 'value'
221 }),
222 mock_resource({}) 213 mock_resource({})
223 ] 214 ]
224 215