Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_get_default_resource_name() -> None:
resource_name = get_default_resource_name("helloworldproject")
assert resource_name == "Helloworldproject"
resource_name_with_underscores = get_default_resource_name("hello_world_project")
assert resource_name_with_underscores == "HelloWorldProject"
def test_get_default_resource_name() -> None:
resource_name = get_default_resource_name("helloworldproject")
assert resource_name == "Helloworldproject"
resource_name_with_underscores = get_default_resource_name("hello_world_project")
assert resource_name_with_underscores == "HelloWorldProject"
config_dir = os.getcwd()
project_dir = os.path.join(config_dir, project_dir_name)
if not os.path.isdir(project_dir):
raise click.ClickException(
f"Directory not found at {project_dir}! "
"(Hint: The project folder must be in current working directory.)"
)
description = click.prompt(
"Enter a brief description of your project.",
type=str,
default="ASGI application",
)
resource_name = click.prompt(
"What should be the prefix used for naming resources?",
type=str,
default=get_default_resource_name(project_name),
)
url_root = click.prompt("What should be the root URL path?", type=str, default="/")
runtime_version = click.prompt(
"What version of Python are you using?", type=str, default="3.7"
)
timeout = click.prompt(
"What should the timeout be (in seconds, max=300)?", type=int, default=300
)
default_region_name = get_default_region_name()
region_name = click.prompt(
"What region should be used?", default=default_region_name
)
s3_bucket_name = click.prompt(
"An S3 bucket is required. \n\nEnter the name of an existing bucket or "
f"one will be generated.",
type=str,