|
1 |
| -""" |
2 |
| -Integration tests for init command |
3 |
| -""" |
4 |
| -import os |
5 |
| -import shutil |
6 |
| -import tempfile |
7 |
| -from pathlib import Path |
8 |
| -from subprocess import PIPE, Popen, TimeoutExpired |
9 | 1 | from unittest import TestCase
|
10 | 2 |
|
11 | 3 | from parameterized import parameterized
|
| 4 | +from subprocess import Popen, TimeoutExpired, PIPE |
| 5 | +import os |
| 6 | +import shutil |
| 7 | +import tempfile |
12 | 8 | from samcli.lib.utils.packagetype import IMAGE, ZIP
|
13 | 9 |
|
| 10 | +from pathlib import Path |
| 11 | + |
14 | 12 | TIMEOUT = 300
|
15 | 13 |
|
16 | 14 |
|
@@ -227,7 +225,7 @@ def test_init_command_no_interactive_missing_name(self):
|
227 | 225 | You can also re-run without the --no-interactive flag to be prompted for required values.
|
228 | 226 | """
|
229 | 227 |
|
230 |
| - self.assertIn(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
| 228 | + self.assertEqual(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
231 | 229 |
|
232 | 230 | def test_init_command_no_interactive_apptemplate_location(self):
|
233 | 231 | stderr = None
|
@@ -265,7 +263,7 @@ def test_init_command_no_interactive_apptemplate_location(self):
|
265 | 263 | --location
|
266 | 264 | """
|
267 | 265 |
|
268 |
| - self.assertIn(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
| 266 | + self.assertEqual(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
269 | 267 |
|
270 | 268 | def test_init_command_no_interactive_runtime_location(self):
|
271 | 269 | stderr = None
|
@@ -303,7 +301,7 @@ def test_init_command_no_interactive_runtime_location(self):
|
303 | 301 | --location
|
304 | 302 | """
|
305 | 303 |
|
306 |
| - self.assertIn(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
| 304 | + self.assertEqual(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
307 | 305 |
|
308 | 306 | def test_init_command_no_interactive_base_image_location(self):
|
309 | 307 | stderr = None
|
@@ -341,7 +339,7 @@ def test_init_command_no_interactive_base_image_location(self):
|
341 | 339 | --location
|
342 | 340 | """
|
343 | 341 |
|
344 |
| - self.assertIn(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
| 342 | + self.assertEqual(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
345 | 343 |
|
346 | 344 | def test_init_command_no_interactive_base_image_no_dependency(self):
|
347 | 345 | stderr = None
|
@@ -381,7 +379,7 @@ def test_init_command_no_interactive_base_image_no_dependency(self):
|
381 | 379 | You can also re-run without the --no-interactive flag to be prompted for required values.
|
382 | 380 | """
|
383 | 381 |
|
384 |
| - self.assertIn(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
| 382 | + self.assertEqual(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
385 | 383 |
|
386 | 384 | def test_init_command_no_interactive_packagetype_location(self):
|
387 | 385 | stderr = None
|
@@ -419,7 +417,7 @@ def test_init_command_no_interactive_packagetype_location(self):
|
419 | 417 | --location
|
420 | 418 | """
|
421 | 419 |
|
422 |
| - self.assertIn(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
| 420 | + self.assertEqual(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
423 | 421 |
|
424 | 422 | def test_init_command_no_interactive_base_image_no_packagetype(self):
|
425 | 423 | stderr = None
|
@@ -457,7 +455,7 @@ def test_init_command_no_interactive_base_image_no_packagetype(self):
|
457 | 455 | You can also re-run without the --no-interactive flag to be prompted for required values.
|
458 | 456 | """
|
459 | 457 |
|
460 |
| - self.assertIn(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
| 458 | + self.assertEqual(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
461 | 459 |
|
462 | 460 | def test_init_command_wrong_packagetype(self):
|
463 | 461 | stderr = None
|
@@ -491,7 +489,7 @@ def test_init_command_wrong_packagetype(self):
|
491 | 489 | _get_command()
|
492 | 490 | )
|
493 | 491 |
|
494 |
| - self.assertIn(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
| 492 | + self.assertEqual(errmsg.strip(), "\n".join(stderr.strip().splitlines())) |
495 | 493 |
|
496 | 494 |
|
497 | 495 | class TestInitWithArbitraryProject(TestCase):
|
|
0 commit comments