Esempio n. 1
0
 def addSurvey(self, country, language, title):
     from euphorie.content.survey import Survey
     from euphorie.client.sector import ClientSector
     if "sector" not in country:
         country["sector"] = ClientSector()
         country["sector"].title = u"Test sector"
         country["sector"].id = "sector"
     sector = country["sector"]
     survey = Survey()
     survey.title = title
     survey.id = language
     survey.language = language
     sector[language] = survey
     return survey
Esempio n. 2
0
 def addSurvey(self, country, language, title):
     from euphorie.content.survey import Survey
     from euphorie.client.sector import ClientSector
     if "sector" not in country:
         country["sector"] = ClientSector()
         country["sector"].title = u"Test sector"
         country["sector"].id = "sector"
     sector = country["sector"]
     survey = Survey()
     survey.title = title
     survey.id = language
     survey.language = language
     sector[language] = survey
     return survey
Esempio n. 3
0
 def setUp(self):
     super(TestURLs, self).setUp()
     self.loginAsPortalOwner()
     self.client = self.portal.client
     # Set locals
     request = testRequest()
     locals.request = request
     # Add survey
     self.client['en'] = ClientCountry('en')
     country = self.client['en']
     country["sector"] = ClientSector('sector')
     country["sector"].title = u"Test sector"
     country["sector"].id = "sector"
     sector = country["sector"]
     survey = Survey('survey')
     survey.title = u'Test Survey'
     survey.language = 'en'
     sector['survey'] = survey
Esempio n. 4
0
 def setUp(self):
     super(TestURLs, self).setUp()
     self.loginAsPortalOwner()
     self.client = self.portal.client
     # Set locals
     request = testRequest()
     locals.request = request
     # Add survey
     self.client['en'] = ClientCountry('en')
     country = self.client['en']
     country["sector"] = ClientSector('sector')
     country["sector"].title = u"Test sector"
     country["sector"].id = "sector"
     sector = country["sector"]
     survey = Survey('survey')
     survey.title = u'Test Survey'
     survey.introduction = u"This is a survey that is well suited for tests"
     survey.language = 'en'
     sector['survey'] = survey