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
27 lines (23 loc) · 697 Bytes
/
code_test.py
File metadata and controls
27 lines (23 loc) · 697 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
26
27
import sys
import os
sys.path.append(os.path.abspath("./ml_service/util")) # NOQA: E402
from workspace import get_workspace
from env_variables import Env
# Just an example of a unit test against
# a utility function common_scoring.next_saturday
def test_get_workspace():
e = Env()
workspace_name = e.workspace_name
resource_group = e.resource_group
subscription_id = e.subscription_id
tenant_id = e.tenant_id
app_id = e.app_id
app_secret = e.app_secret
aml_workspace = get_workspace(
workspace_name,
resource_group,
subscription_id,
tenant_id,
app_id,
app_secret)
assert aml_workspace.name == workspace_name