Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bramelfrink committed Oct 9, 2024
1 parent 0fbe6d8 commit 6fe1bcf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/damavand/cloud/aws/resources/vllm_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def api_key_secret_version(self) -> aws.secretsmanager.SecretVersion:
AttributeError
When api_key_required is False.
"""
if self.args.api_key_required:
if not self.args.api_key_required:
raise AttributeError("`api_key_secret_version` is only available when api_key_required is False")

return aws.secretsmanager.SecretVersion(
Expand All @@ -445,7 +445,7 @@ def default_usage_plan(self) -> aws.apigateway.UsagePlan:
AttributeError
When api_key_required is False.
"""
if self.args.api_key_required:
if not self.args.api_key_required:
raise AttributeError("`default_usage_plan` is only available when api_key_required is False")

return aws.apigateway.UsagePlan(
Expand All @@ -472,7 +472,7 @@ def tier_1_usage_plan(self) -> aws.apigateway.UsagePlan:
AttributeError
When api_key_required is False.
"""
if self.args.api_key_required:
if not self.args.api_key_required:
raise AttributeError("`default_usage_plan` is only available when api_key_required is False")

return aws.apigateway.UsagePlan(
Expand Down Expand Up @@ -501,7 +501,7 @@ def tier_2_usage_plan(self) -> aws.apigateway.UsagePlan:
AttributeError
When api_key_required is False.
"""
if self.args.api_key_required:
if not self.args.api_key_required:
raise AttributeError("`default_usage_plan` is only available when api_key_required is False")

return aws.apigateway.UsagePlan(
Expand Down Expand Up @@ -530,7 +530,7 @@ def tier_3_usage_plan(self) -> aws.apigateway.UsagePlan:
AttributeError
When api_key_required is False.
"""
if self.args.api_key_required:
if not self.args.api_key_required:
raise AttributeError("`default_usage_plan` is only available when api_key_required is False")

return aws.apigateway.UsagePlan(
Expand Down Expand Up @@ -558,7 +558,7 @@ def api_key_usage_plan(self) -> aws.apigateway.UsagePlanKey:
AttributeError
When api_key_required is False.
"""
if self.args.api_key_required:
if not self.args.api_key_required:
raise AttributeError("`api_key_usage_plan` is only available when api_key_required is False")

return aws.apigateway.UsagePlanKey(
Expand Down
6 changes: 3 additions & 3 deletions tests/clouds/aws/resources/test_vllm_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_public_internet_access():
vllm = AwsVllmComponent(
name="test",
args=AwsVllmComponentArgs(
public_internet_access=True,
api_key_required=False,
),
)

Expand All @@ -78,7 +78,7 @@ def test_model_image_version():
name="test",
args=AwsVllmComponentArgs(
model_image_version="0.29.0",
public_internet_access=True,
api_key_required=True,
),
)

Expand All @@ -90,7 +90,7 @@ def test_model_image_config():
name="test",
args=AwsVllmComponentArgs(
model_name="microsoft/Phi-3-mini-4k-instruct",
public_internet_access=True,
api_key_required=True,
),
)

Expand Down

0 comments on commit 6fe1bcf

Please sign in to comment.