<s> from aleph . index import delete_source , optimize_search <EOL> from aleph . model import Source <EOL> from aleph . tests . util import TestCase <EOL> class IndexTestCase ( TestCase ) : <EOL> def setUp ( self ) : <EOL> super ( IndexTestCase , self ) . setUp ( ) <EOL> self . load_fixtures ( '<STR_LIT>' ) <EOL> def test_delete_source ( self ) : <EOL> source = Source . by_id ( <NUM_LIT:1000> ) <EOL> res = self . client . get ( '<STR_LIT>' ) <EOL> assert res . json [ '<STR_LIT>' ] == <NUM_LIT:1> , res . json <EOL> delete_source ( source . id ) <EOL> optimize_search ( ) <EOL> res = self . client . get ( '<STR_LIT>' ) <EOL> assert res . json [ '<STR_LIT>' ] == <NUM_LIT:0> , res . json </s>
