コード例 #1
0
 def test_remote_user_from_proto_fail():
     with pytest.raises(IncorrectTypeError) as err_info:
         RemoteUser.from_proto('')
     assert err_info.value.message == (
         "RemoteUser's parameter 'user' was"
         " type 'str' but should be of class 'dlpx.virtualization.api"
         ".common_pb2.RemoteUser'.")
コード例 #2
0
 def test_remote_user_from_proto_success():
     remote_user_proto_buf = common_pb2.RemoteUser()
     remote_user = RemoteUser.from_proto(remote_user_proto_buf)
     assert isinstance(remote_user, RemoteUser)