<s> from django . test import TestCase <EOL> from seed . models import CanonicalBuilding <EOL> from surveys . models import ( <EOL> Survey , <EOL> SurveyQuestion , <EOL> SurveyAnswer , <EOL> SurveyBuilding , <EOL> ) <EOL> class TestSurveyModels ( TestCase ) : <EOL> def setUp ( self ) : <EOL> super ( TestSurveyModels , self ) . setUp ( ) <EOL> self . can = CanonicalBuilding . objects . create ( ) <EOL> def test_survey_structure ( self ) : <EOL> """<STR_LIT>""" <EOL> s = Survey . objects . create ( ) <EOL> SurveyBuilding . objects . create ( survey = s , canonical_building = self . can ) <EOL> q = SurveyQuestion . objects . create ( <EOL> survey = s , question = '<STR_LIT>' <EOL> ) <EOL> a = SurveyAnswer . objects . create ( <EOL> canonical_building = self . can , <EOL> question = q , <EOL> ) <EOL> self . assertEqual ( self . can . survey_answers . first ( ) , a ) </s>
