@@ -6503,33 +6503,33 @@ def test_create_hub(sagemaker_session):
6503
6503
)
6504
6504
6505
6505
request = {
6506
- "hub_name " : "mock-hub-name" ,
6507
- "hub_description " : "this is my sagemaker hub" ,
6508
- "hub_display_name " : "Mock Hub" ,
6509
- "hub_search_keywords " : ["mock" , "hub" , "123" ],
6510
- "s3_storage_config " : {
6506
+ "HubName " : "mock-hub-name" ,
6507
+ "HubDescription " : "this is my sagemaker hub" ,
6508
+ "HubDisplayName " : "Mock Hub" ,
6509
+ "HubSearchKeywords " : ["mock" , "hub" , "123" ],
6510
+ "S3StorageConfig " : {
6511
6511
"S3OutputPath" : "s3://my-hub-bucket/"
6512
6512
},
6513
- "tags " : [{"Key" : "tag-key-1" , "Value" : "tag-value-1" }]
6513
+ "Tags " : [{"Key" : "tag-key-1" , "Value" : "tag-value-1" }]
6514
6514
}
6515
6515
6516
- sagemaker_session .create_hub .assert_called_with (** request )
6516
+ sagemaker_session .sagemaker_client . create_hub .assert_called_with (** request )
6517
6517
6518
6518
def test_describe_hub (sagemaker_session ):
6519
6519
sagemaker_session .describe_hub (
6520
6520
hub_name = "mock-hub-name" ,
6521
6521
)
6522
6522
6523
6523
request = {
6524
- "hub_name " : "mock-hub-name" ,
6524
+ "HubName " : "mock-hub-name" ,
6525
6525
}
6526
6526
6527
- sagemaker_session .describe_hub .assert_called_with (** request )
6527
+ sagemaker_session .sagemaker_client . describe_hub .assert_called_with (** request )
6528
6528
6529
6529
def test_list_hubs (sagemaker_session ):
6530
6530
sagemaker_session .list_hubs (
6531
6531
creation_time_after = "08-14-1997 12:00:00" ,
6532
- creation_time_before = "01-08/ 2024 10:25:00" ,
6532
+ creation_time_before = "01-08- 2024 10:25:00" ,
6533
6533
max_results = "25" ,
6534
6534
max_schema_version = "1.0.5" ,
6535
6535
name_contains = "mock-hub" ,
@@ -6538,16 +6538,16 @@ def test_list_hubs(sagemaker_session):
6538
6538
)
6539
6539
6540
6540
request = {
6541
- "creation_time_after " : "08-14-1997 12:00:00" ,
6542
- "creation_time_before " : "01-08/ 2024 10:25:00" ,
6543
- "max_results " : "25" ,
6544
- "max_schema_version " : "1.0.5" ,
6545
- "name_contains " : "mock-hub" ,
6546
- "sort_by " : "HubName" ,
6547
- "sort_order " : "Ascending"
6541
+ "CreationTimeAfter " : "08-14-1997 12:00:00" ,
6542
+ "CreationTimeBefore " : "01-08- 2024 10:25:00" ,
6543
+ "MaxResults " : "25" ,
6544
+ "MaxSchemaVersion " : "1.0.5" ,
6545
+ "NameContains " : "mock-hub" ,
6546
+ "SortBy " : "HubName" ,
6547
+ "SortOrder " : "Ascending"
6548
6548
}
6549
6549
6550
- sagemaker_session .list_hubs .assert_called_with (** request )
6550
+ sagemaker_session .sagemaker_client . list_hubs .assert_called_with (** request )
6551
6551
6552
6552
def test_list_hub_contents (sagemaker_session ):
6553
6553
sagemaker_session .list_hub_contents (
@@ -6563,29 +6563,29 @@ def test_list_hub_contents(sagemaker_session):
6563
6563
)
6564
6564
6565
6565
request = {
6566
- "hub_name " : "mock-hub-123" ,
6567
- "hub_content_type " : "MODEL" ,
6568
- "creation_time_after " : "08-14-1997 12:00:00" ,
6569
- "creation_time_before " : "01-08/2024 10:25:00" ,
6570
- "max_results " : "25" ,
6571
- "max_schema_version " : "1.0.5" ,
6572
- "name_contains " : "mock-hub" ,
6573
- "sort_by " : "HubName" ,
6574
- "sort_order " : "Ascending"
6566
+ "HubName " : "mock-hub-123" ,
6567
+ "HubContentType " : "MODEL" ,
6568
+ "CreationTimeAfter " : "08-14-1997 12:00:00" ,
6569
+ "CreationTimeBefore " : "01-08/2024 10:25:00" ,
6570
+ "MaxResults " : "25" ,
6571
+ "MaxSchemaVersion " : "1.0.5" ,
6572
+ "NameContains " : "mock-hub" ,
6573
+ "SortBy " : "HubName" ,
6574
+ "SortOrder " : "Ascending"
6575
6575
}
6576
6576
6577
- sagemaker_session .list_hub_contents .assert_called_with (** request )
6577
+ sagemaker_session .sagemaker_client . list_hub_contents .assert_called_with (** request )
6578
6578
6579
6579
def test_delete_hub (sagemaker_session ):
6580
6580
sagemaker_session .delete_hub (
6581
6581
hub_name = "mock-hub-123" ,
6582
6582
)
6583
6583
6584
6584
request = {
6585
- "hub_name " : "mock-hub-123" ,
6585
+ "HubName " : "mock-hub-123" ,
6586
6586
}
6587
6587
6588
- sagemaker_session .delete_hub .assert_called_with (** request )
6588
+ sagemaker_session .sagemaker_client . delete_hub .assert_called_with (** request )
6589
6589
6590
6590
def test_import_hub_content (sagemaker_session ):
6591
6591
sagemaker_session .import_hub_content (
@@ -6602,19 +6602,19 @@ def test_import_hub_content(sagemaker_session):
6602
6602
)
6603
6603
6604
6604
request = {
6605
- "hub_name " : "mock-hub-123" ,
6606
- "hub_content_type " : "MODEL" ,
6607
- "document_schema_version " : "1.0.0" ,
6608
- "hub_content_document " : "{'training_script_location':'s3://path/to/script.py'}" ,
6609
- "hub_content_name " : "mock-hub-content-1" ,
6610
- "hub_content_display_name " : "Mock Hub Content One" ,
6611
- "hub_content_description " : "This is my special Hub Content for my special Hub" ,
6612
- "hub_content_version " : "5.5.5" ,
6613
- "hub_content_markdown " : "markdown" ,
6614
- "hub_content_search_keywords " : ["Hub" ,"Machine Learning" ,"Content" ]
6605
+ "HubName " : "mock-hub-123" ,
6606
+ "HubContentType " : "MODEL" ,
6607
+ "DocumentSchemaVersion " : "1.0.0" ,
6608
+ "HubContentDocument " : "{'training_script_location':'s3://path/to/script.py'}" ,
6609
+ "HubContentName " : "mock-hub-content-1" ,
6610
+ "HubContentDisplayName " : "Mock Hub Content One" ,
6611
+ "HubContentDescription " : "This is my special Hub Content for my special Hub" ,
6612
+ "HubContentVersion " : "5.5.5" ,
6613
+ "HubContentMarkdown " : "markdown" ,
6614
+ "HubContentSearchKeywords " : ["Hub" ,"Machine Learning" ,"Content" ]
6615
6615
}
6616
6616
6617
- sagemaker_session .import_hub_content .assert_called_with (** request )
6617
+ sagemaker_session .sagemaker_client . import_hub_content .assert_called_with (** request )
6618
6618
6619
6619
def test_describe_hub_content (sagemaker_session ):
6620
6620
sagemaker_session .describe_hub_content (
@@ -6625,13 +6625,13 @@ def test_describe_hub_content(sagemaker_session):
6625
6625
)
6626
6626
6627
6627
request = {
6628
- "hub_name " : "mock-hub-123" ,
6629
- "hub_content_type " : "MODEL" ,
6630
- "hub_content_name " : "mock-hub-content-1" ,
6631
- "hub_content_version " : "5.5.5" ,
6628
+ "HubName " : "mock-hub-123" ,
6629
+ "HubContentType " : "MODEL" ,
6630
+ "HubContentName " : "mock-hub-content-1" ,
6631
+ "HubContentVersion " : "5.5.5" ,
6632
6632
}
6633
6633
6634
- sagemaker_session .describe_hub_content .assert_called_with (** request )
6634
+ sagemaker_session .sagemaker_client . describe_hub_content .assert_called_with (** request )
6635
6635
6636
6636
def test_delete_hub_content (sagemaker_session ):
6637
6637
sagemaker_session .delete_hub_content (
@@ -6642,10 +6642,10 @@ def test_delete_hub_content(sagemaker_session):
6642
6642
)
6643
6643
6644
6644
request = {
6645
- "hub_name " : "mock-hub-123" ,
6646
- "hub_content_type " : "MODEL" ,
6647
- "hub_content_name " : "mock-hub-content-1" ,
6648
- "hub_content_version " : "5.5.5" ,
6645
+ "HubName " : "mock-hub-123" ,
6646
+ "HubContentType " : "MODEL" ,
6647
+ "HubContentName " : "mock-hub-content-1" ,
6648
+ "HubContentVersion " : "5.5.5" ,
6649
6649
}
6650
6650
6651
- sagemaker_session .delete_hub_content .assert_called_with (** request )
6651
+ sagemaker_session .sagemaker_client . delete_hub_content .assert_called_with (** request )
0 commit comments