Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-Morgan committed Nov 12, 2023
1 parent 681dcca commit 261cc87
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def automate_function(
automate_context: AutomationContext
) -> None:

# Get info from Automate
client = automate_context.speckle_client
PROJECT_ID = automate_context.automation_run_data.project_id
VERSION_ID = automate_context.automation_run_data.version_id
Expand Down
2 changes: 1 addition & 1 deletion speckle_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def set_filename(fileName):

light = bpy.data.lights.new("myLight", 'POINT')
light.color = Color((1, 0.34, 0.1))
light.energy = 100 #watts
light.energy = 300 #watts

print(f"Found {len(rooms)} rooms")
for room in rooms:
Expand Down
19 changes: 10 additions & 9 deletions tests/test_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

from main import automate_function


def crypto_random_string(length: int) -> str:
"""Generate a semi crypto random string of a given length."""
alphabet = string.ascii_letters + string.digits
Expand Down Expand Up @@ -123,13 +124,13 @@ def automation_run_data(
automation_revision_id = "myFunctionVer" # crypto_random_string(10)

register_new_automation(
project_id,
model_id,
test_client,
automation_id,
automation_name,
automation_revision_id,
)
project_id,
model_id,
test_client,
automation_id,
automation_name,
automation_revision_id,
)

automation_run_id = crypto_random_string(10)
function_id = crypto_random_string(10)
Expand All @@ -144,8 +145,8 @@ def automation_run_data(
automation_revision_id=automation_revision_id,
automation_run_id=automation_run_id,
function_id=function_id,
function_name="",
function_release= function_revision
function_name="blender-automate",
function_logo=""
)


Expand Down

0 comments on commit 261cc87

Please sign in to comment.