Ejemplo n.º 1
0
 def testUpdateCompany_Empty(self):
     from tno.euphorie.session import Upload
     from euphorie.client import model
     from tno.euphorie.model import DutchCompany
     session = model.SurveySession()
     input = objectify.fromstring(self.BASE_SNIPPET)
     view = Upload(None, None)
     view.updateCompany(input, session)
     self.assertTrue(isinstance(session.dutch_company, DutchCompany))
Ejemplo n.º 2
0
    def testUpdateCompany_Empty(self):
        from euphorie.client import model
        from tno.euphorie.model import DutchCompany
        from tno.euphorie.session import Upload

        session = model.SurveySession()
        input = objectify.fromstring(self.BASE_SNIPPET)
        view = Upload(None, None)
        view.updateCompany(input, session)
        self.assertTrue(isinstance(session.dutch_company, DutchCompany))
Ejemplo n.º 3
0
    def testUpdateCompany_AantalInDienst(self):
        from euphorie.client import model
        from tno.euphorie.session import Upload

        session = model.SurveySession()
        input = objectify.fromstring(self.BASE_SNIPPET)
        view = Upload(None, None)
        input.gegevens.attrib["aantalindienst"] = "1"
        view.updateCompany(input, session)
        self.assertEqual(session.dutch_company.employees, "40h")
        input.gegevens.attrib["aantalindienst"] = "25"
        view.updateCompany(input, session)
        self.assertEqual(session.dutch_company.employees, "max25")
        input.gegevens.attrib["aantalindienst"] = "999"
        view.updateCompany(input, session)
        self.assertEqual(session.dutch_company.employees, "over25")
Ejemplo n.º 4
0
 def testUpdateCompany_AantalInDienst(self):
     from tno.euphorie.session import Upload
     from euphorie.client import model
     session = model.SurveySession()
     input = objectify.fromstring(self.BASE_SNIPPET)
     view = Upload(None, None)
     input.gegevens.attrib["aantalindienst"] = "1"
     view.updateCompany(input, session)
     self.assertEqual(session.dutch_company.employees, "40h")
     input.gegevens.attrib["aantalindienst"] = "25"
     view.updateCompany(input, session)
     self.assertEqual(session.dutch_company.employees, "max25")
     input.gegevens.attrib["aantalindienst"] = "999"
     view.updateCompany(input, session)
     self.assertEqual(session.dutch_company.employees, "over25")