

def test_thread_is_reindexed_on_username_change(self):
    search = ThreadMappingType.search()
    u = UserFactory(username='dexter')
    ThreadFactory(creator=u, title='Hello')
    self.refresh()
    eq_(search.query(post_title='hello')[0]['post_author_ord'], ['dexter'])
    u.username = 'walter'
    u.save()
    self.refresh()
    eq_(u.query(post_title='hello')[0]['post_author_ord'], ['walter'])

dataset/ETHPy150Open mozilla/kitsune/kitsune/forums/tests/test_es.py TestPostUpdate.test_thread_is_reindexed_on_username_change/VarMisuse@86/118 `search`->`u`