@@ -382,10 +382,13 @@ def test_create_like(self, confirm_mock):
382382 }
383383
384384 confirm_mock .return_value = True
385+ # Prompts to confirm hostname, domain, and datacenter.
386+ stdin = "\n \n \n "
385387 result = self .run_command (['vs' , 'create' ,
386388 '--like=123' ,
387389 '--san' ,
388- '--billing=hourly' ])
390+ '--billing=hourly' ],
391+ stdin = stdin )
389392
390393 self .assert_no_fail (result )
391394 self .assertIn ('"guid": "1a2b3c-1701"' , result .output )
@@ -426,10 +429,13 @@ def test_create_like_tags(self, confirm_mock):
426429 }
427430
428431 confirm_mock .return_value = True
432+ # Prompts to confirm hostname, domain, and datacenter.
433+ stdin = "\n \n \n "
429434 result = self .run_command (['vs' , 'create' ,
430435 '--like=123' ,
431436 '--san' ,
432- '--billing=hourly' ])
437+ '--billing=hourly' ],
438+ stdin = stdin )
433439
434440 self .assert_no_fail (result )
435441 self .assertIn ('"guid": "1a2b3c-1701"' , result .output )
@@ -457,10 +463,13 @@ def test_create_like_image(self, confirm_mock):
457463 }
458464
459465 confirm_mock .return_value = True
466+ # Prompts to confirm hostname, domain, and datacenter.
467+ stdin = "\n \n \n "
460468 result = self .run_command (['vs' , 'create' ,
461469 '--like=123' ,
462470 '--san' ,
463- '--billing=hourly' ])
471+ '--billing=hourly' ],
472+ stdin = stdin )
464473
465474 self .assert_no_fail (result )
466475 self .assertIn ('"guid": "1a2b3c-1701"' , result .output )
@@ -499,7 +508,9 @@ def test_create_like_flavor(self, confirm_mock):
499508 }
500509
501510 confirm_mock .return_value = True
502- result = self .run_command (['vs' , 'create' , '--like=123' ])
511+ # Prompts to confirm hostname, domain, and datacenter.
512+ stdin = "\n \n \n "
513+ result = self .run_command (['vs' , 'create' , '--like=123' ], stdin = stdin )
503514
504515 self .assert_no_fail (result )
505516 self .assertIn ('"guid": "1a2b3c-1701"' , result .output )
@@ -540,7 +551,9 @@ def test_create_like_transient(self, confirm_mock):
540551 }
541552
542553 confirm_mock .return_value = True
543- result = self .run_command (['vs' , 'create' , '--like=123' ])
554+ # Prompts to confirm hostname, domain, and datacenter.
555+ stdin = "\n \n \n "
556+ result = self .run_command (['vs' , 'create' , '--like=123' ], stdin = stdin )
544557
545558 self .assert_no_fail (result )
546559 self .assertIn ('"guid": "1a2b3c-1701"' , result .output )
0 commit comments