File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55import pytest
66
7- from botcity .maestro import AutomationTask , BotMaestroSDK
7+ from botcity .maestro import Artifact , AutomationTask , BotMaestroSDK
88
99
1010def test_post_artifact (maestro : BotMaestroSDK , file : str , task : AutomationTask ):
11- maestro .post_artifact (
11+ artifact_name = "My Artifact.txt"
12+ response = maestro .post_artifact (
1213 task_id = task .id ,
13- artifact_name = "My Artifact" ,
14+ artifact_name = artifact_name ,
1415 filepath = file
1516 )
1617
18+ artifact = Artifact .from_json (response .payload )
19+ assert artifact .name == artifact_name
20+
21+
22+ def test_post_artifact_without_file_extension (maestro : BotMaestroSDK , file : str , task : AutomationTask ):
23+ artifact_name = "My Artifact"
24+ response = maestro .post_artifact (
25+ task_id = task .id ,
26+ artifact_name = artifact_name ,
27+ filepath = file
28+ )
29+
30+ artifact = Artifact .from_json (response .payload )
31+ assert artifact .name == f"{ artifact_name } .txt"
32+
1733
1834@pytest .mark .depends (name = "test_post_artifact" )
1935def test_list_artifacts (maestro : BotMaestroSDK ):
You can’t perform that action at this time.
0 commit comments