예제 #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
예제 #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
예제 #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
예제 #4
0
 def setUp(self):
     super(TestURLs, self).setUp()
     # Set locals
     request = testRequest()
     locals.request = request
     self.loginAsPortalOwner()
     self.client = self.portal.client
     # Add survey
     self.client._setOb("en", ClientCountry("en"))
     country = self.client["en"]
     country._setOb("sector", ClientSector("sector"))
     country["sector"].title = "Test sector"
     country["sector"].id = "sector"
     sector = country["sector"]
     survey = Survey("survey")
     survey.title = "Test Survey"
     survey.introduction = "This is a survey that is well suited for tests"
     survey.language = "en"
     sector._setOb("survey", survey)
예제 #5
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