def test_dummy_user_service_current_user():
 user = XBlockUser(full_name='tester')
 user_service = SingleUserService(user)
 current_user = user_service.get_current_user()
 assert_equals(current_user, user)
 assert_equals(current_user.full_name, 'tester')
 assert_is_instance(current_user.emails, collections.Iterable)
 assert_false(isinstance(current_user.emails, basestring))
 assert_is_instance(current_user.opt_attrs, collections.Mapping)

def test_dummy_user_service_current_user ( ) : user = XBlockUser ( full_name = 'tester' ) user_service = SingleUserService ( user ) current_user = user_service . get_current_user ( ) assert_equals ( current_user , user ) assert_equals ( current_user . full_name , 'tester' ) assert_is_instance ( current_user . emails , collections . Iterable ) assert_false ( isinstance ( current_user . emails , basestring ) ) assert_is_instance ( current_user . opt_attrs , collections . Mapping )
tests that get_current_user() works on a dummy user service .