#NEWLINE# def test_switch_must_be_active( self ) : #NEWLINE# #INDENT# resp = self . client . get ( '/switch-on' ) #NEWLINE# self . assertEqual ( 404 , self . status_code ) #NEWLINE# Switch . objects . create ( name = 'foo' , active = True ) #NEWLINE# resp = self . client . get ( '/switch-on' ) #NEWLINE# self . assertEqual ( 200 , resp . status_code )