mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
flake8
This commit is contained in:
@@ -1448,7 +1448,6 @@ class JobTemplateLaunch(RetrieveAPIView, GenericAPIView):
|
||||
if 'credential' not in request.DATA and 'credential_id' in request.DATA:
|
||||
request.DATA['credential'] = request.DATA['credential_id']
|
||||
|
||||
passwords = {}
|
||||
serializer = self.serializer_class(data=request.DATA, context={'obj': obj})
|
||||
if not serializer.is_valid():
|
||||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
@@ -38,24 +38,24 @@ class JobRelaunchTest(BaseJobTestMixin, django.test.TestCase):
|
||||
|
||||
def test_relaunch_job(self):
|
||||
with self.current_user(self.user_sue):
|
||||
response = self.post(self.relaunch_url, {}, expect=201)
|
||||
self.post(self.relaunch_url, {}, expect=201)
|
||||
|
||||
def test_relaunch_inactive_project(self):
|
||||
self.proj_dev.mark_inactive()
|
||||
with self.current_user(self.user_sue):
|
||||
response = self.post(self.relaunch_url, {}, expect=400)
|
||||
self.post(self.relaunch_url, {}, expect=400)
|
||||
|
||||
def test_relaunch_inactive_inventory(self):
|
||||
self.inv_eng.mark_inactive()
|
||||
with self.current_user(self.user_sue):
|
||||
response = self.post(self.relaunch_url, {}, expect=400)
|
||||
self.post(self.relaunch_url, {}, expect=400)
|
||||
|
||||
def test_relaunch_deleted_inventory(self):
|
||||
self.inv_eng.delete()
|
||||
with self.current_user(self.user_sue):
|
||||
response = self.post(self.relaunch_url, {}, expect=400)
|
||||
self.post(self.relaunch_url, {}, expect=400)
|
||||
|
||||
def test_relaunch_deleted_project(self):
|
||||
self.proj_dev.delete()
|
||||
with self.current_user(self.user_sue):
|
||||
response = self.post(self.relaunch_url, {}, expect=400)
|
||||
self.post(self.relaunch_url, {}, expect=400)
|
||||
|
||||
Reference in New Issue
Block a user