'Tests that we can post advance settings when course staff is not enrolled.'

@patch.dict(settings.FEATURES, {'ENABLE_EDXNOTES': True})
@patch('xmodule.util.django.get_current_request')
def test_post_settings_with_staff_not_enrolled(self, mock_request):

    mock_request.return_value = Mock(META={'HTTP_HOST': 'localhost'})
    user = UserFactory.create(is_staff=True)
    CourseStaffRole(self.course.id).add_users(user)
    client = AjaxEnabledTestClient()
    client.login(username=user.username, password=user.password)
    response = self.client.ajax_post(self.course_setting_url, {'advanced_modules': {'value': ['']}})
    self.assertEqual(response.status_code, 200)
