From f3a644a418a24039a25aa8dc19ba5dec0445ff1c Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Tue, 28 Apr 2015 17:15:20 -0400 Subject: [PATCH] added password blank test --- awx/main/tests/jobs/job_launch.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/awx/main/tests/jobs/job_launch.py b/awx/main/tests/jobs/job_launch.py index 1979a0c571..32b0e62287 100644 --- a/awx/main/tests/jobs/job_launch.py +++ b/awx/main/tests/jobs/job_launch.py @@ -185,3 +185,9 @@ class JobTemplateLaunchPasswordsTest(BaseJobTestMixin, django.test.TestCase): response = self.post(self.launch_url, {'ssh_password': 'whatever'}, expect=202) j = Job.objects.get(pk=response['job']) self.assertEqual(j.status, 'new') + + def test_explicit_cred_with_ask_password_empty_string_fail(self): + with self.current_user(self.user_sue): + response = self.post(self.launch_url, {'ssh_password': ''}, expect=400) + j = Job.objects.get(pk=response['job']) + self.assertEqual(j.status, 'new')