'Adding a user with a profile should add it to the index.
Deleting should delete it.'

def test_add_and_delete(self):

    p = ProfileFactory()
    self.refresh()
    eq_(UserMappingType.search().count(), 1)
    p.user.delete()
    self.refresh()
    eq_(UserMappingType.search().count(), 0)
