'The user that creates a library should have instructor (admin) and staff permissions'

def test_creation(self):

    self.assertTrue(has_studio_write_access(self.user, self.lib_key))
    self.assertTrue(has_studio_read_access(self.user, self.lib_key))
    self.assertTrue(CourseInstructorRole(self.lib_key).has_user(self.user))
    self.client.logout()
    self._assert_cannot_create_library(expected_code=302)
    self._login_as_non_staff_user(logout_first=False)
    with patch.dict('django.conf.settings.FEATURES', {'ENABLE_CREATOR_GROUP': True}):
        self._assert_cannot_create_library(expected_code=403)
    add_user_with_status_granted(self.user, self.non_staff_user)
    with patch.dict('django.conf.settings.FEATURES', {'ENABLE_CREATOR_GROUP': True}):
        lib_key2 = self._create_library(library='lib2', display_name='Test    Library    2')
        library2 = modulestore().get_library(lib_key2)
        self.assertIsNotNone(library2)
