'test to check that a function is called using a fiance_admin
rights.'

def test_add_user_to_fiance_admin_role_with_valid_course(self):

    func = Mock()
    decorated_func = require_finance_admin(func)
    request = self.mock_request()
    CourseFinanceAdminRole(self.course.id).add_users(self.instructor)
    decorated_func(request, self.course.id.to_deprecated_string())
    self.assertTrue(func.called)
