def test_max_name_length(self):
    msg = 'Index names cannot be longer than 30 characters.'
    with self.assertRaisesMessage(ValueError, msg):
        models.Index(fields=['title'], name='looooooooooooong_index_name_idx')
def test_max_name_length(self):
    msg = 'Index names cannot be longer than 30 characters.'
    with self.assertRaisesMessage(ValueError, msg):
        models.Index(fields=['title'], name='looooooooooooong_index_name_idx')