<s> from django . core . urlresolvers import reverse <EOL> from . . models import Airport , Person <EOL> from . base import TestBase <EOL> class TestAirport ( TestBase ) : <EOL> def setUp ( self ) : <EOL> super ( ) . setUp ( ) <EOL> self . _setUpUsersAndLogin ( ) <EOL> def test_airport_delete ( self ) : <EOL> """<STR_LIT>""" <EOL> L1 = [ <EOL> self . airport_0_0 . iata , <EOL> self . airport_0_50 . iata , <EOL> self . airport_50_100 . iata , <EOL> self . airport_55_105 . iata , <EOL> ] <EOL> L2 = [ <EOL> self . hermione . pk , <EOL> self . harry . pk , <EOL> self . ron . pk , <EOL> ] <EOL> for iata in L1 [ : <NUM_LIT:3> ] : <EOL> rv = self . client . get ( reverse ( '<STR_LIT>' , args = [ iata , ] ) ) <EOL> content = rv . content . decode ( '<STR_LIT:utf-8>' ) <EOL> assert '<STR_LIT>' in content <EOL> for person_pk in L2 : <EOL> Person . objects . get ( pk = person_pk ) . delete ( ) <EOL> for iata in L1 : <EOL> rv = self . client . get ( reverse ( '<STR_LIT>' , args = [ iata , ] ) ) <EOL> assert rv . status_code == <NUM_LIT> <EOL> with self . assertRaises ( Airport . DoesNotExist ) : <EOL> Airport . objects . get ( iata = iata ) </s>
