def test_remote_user_to_proto_non_default():
     remote_user = RemoteUser('name', 'reference')
     remote_user_proto = remote_user.to_proto()
     assert isinstance(remote_user_proto, common_pb2.RemoteUser)
 def test_init_remote_user_incorrect_reference():
     with pytest.raises(IncorrectTypeError) as err_info:
         RemoteUser('', 1)
     assert err_info.value.message == (
         "RemoteUser's parameter 'reference' was"
         " type 'int' but should be of type 'basestring'.")
def remote_user():
    return RemoteUser("user", "user-reference")
 def test_init_remote_user_success():
     RemoteUser(name='name', reference='reference')
Exemple #5
0
def user():
    return RemoteUser(constants.username, constants.UserReference)