forked from microsoft/MLOpsPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode_test.py
More file actions
25 lines (21 loc) · 765 Bytes
/
Copy pathcode_test.py
File metadata and controls
25 lines (21 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import sys
import os
sys.path.append(os.path.abspath("./ml_service/util")) # NOQA: E402
from workspace import get_workspace
# Just an example of a unit test against
# a utility function common_scoring.next_saturday
def test_get_workspace():
workspace_name = os.environ.get("BASE_NAME")+"-AML-WS"
resource_group = os.environ.get("BASE_NAME")+"-AML-RG"
subscription_id = os.environ.get("SUBSCRIPTION_ID")
tenant_id = os.environ.get("TENANT_ID")
app_id = os.environ.get("SP_APP_ID")
app_secret = os.environ.get("SP_APP_SECRET")
aml_workspace = get_workspace(
workspace_name,
resource_group,
subscription_id,
tenant_id,
app_id,
app_secret)
assert aml_workspace.name == workspace_name