Example #1
0
    def test_extra(self):
        self.assertEqual([], self.luct_glo.listing())

        inst = LucteriosInstance("inst_e", self.path_dir)
        inst.set_extra(
            "DEBUG=True,ALLOWED_HOSTS=[localhost;127.0.0.1],DEFAULT_PAGE=cms/,NBMAX=5,PIVALUE=3.1415"
        )
        inst.add()
        self.assertEqual(["inst_e"], self.luct_glo.listing())

        # print(open(self.path_dir + '/inst_a/settings.py', 'r').readlines())

        inst = LucteriosInstance("inst_e", self.path_dir)
        inst.read()
        self.assertEqual(
            {
                'DEBUG': True,
                '': {
                    'mode': (0, 'Connexion toujours nécessaire')
                },
                'ALLOWED_HOSTS': ['localhost', '127.0.0.1'],
                'DEFAULT_PAGE': 'cms/',
                "NBMAX": 5,
                'PIVALUE': 3.1415
            }, inst.extra)
        inst.modif()

        inst = LucteriosInstance("inst_e", self.path_dir)
        inst.read()
Example #2
0
 def add_modif_inst_result(self, result, to_create):
     inst = LucteriosInstance(result[0])
     inst.set_extra("LANGUAGE_CODE='%s'" % result[5])
     inst.set_appli(result[1])
     inst.set_module(result[2])
     inst.set_database(result[4])
     if to_create:
         inst.add()
     else:
         inst.modif()
     inst = LucteriosInstance(result[0])
     inst.set_extra(result[3])
     inst.security()
     self.refresh(result[0])
Example #3
0
 def add_modif_inst_result(self, result, to_create):
     inst = LucteriosInstance(result[0])
     inst.set_extra("LANGUAGE_CODE=%s" % result[5])
     inst.set_appli(result[1])
     inst.set_module(result[2])
     inst.set_database(result[4])
     if to_create:
         inst.add()
     else:
         inst.modif()
     inst = LucteriosInstance(result[0])
     inst.set_extra(result[3])
     inst.security()
     self.refresh(result[0])
Example #4
0
    def test_extra(self):
        self.assertEqual([], self.luct_glo.listing())

        inst = LucteriosInstance("inst_e", self.path_dir)
        inst.set_extra("DEBUG=True,ALLOWED_HOSTS=[localhost;127.0.0.1],DEFAULT_PAGE=cms/,NBMAX=5,PIVALUE=3.1415")
        inst.add()
        self.assertEqual(["inst_e"], self.luct_glo.listing())

        # print(open(self.path_dir + '/inst_a/settings.py', 'r').readlines())

        inst = LucteriosInstance("inst_e", self.path_dir)
        inst.read()
        self.assertEqual({'DEBUG': True, '': {'mode': (0, 'Connexion toujours nécessaire')},
                          'ALLOWED_HOSTS': ['localhost', '127.0.0.1'], 'DEFAULT_PAGE': 'cms/',
                          "NBMAX": 5, 'PIVALUE': 3.1415}, inst.extra)
        inst.modif()

        inst = LucteriosInstance("inst_e", self.path_dir)
        inst.read()
Example #5
0
    def test_add_modif(self):
        self.assertEqual([], self.luct_glo.listing())

        inst = LucteriosInstance("inst_b", self.path_dir)
        inst.add()
        self.assertEqual(["inst_b"], self.luct_glo.listing())

        inst = LucteriosInstance("inst_b", self.path_dir)
        inst.set_database("sqlite")
        inst.appli_name = "lucterios.standard"
        inst.modules = ('lucterios.dummy',)
        inst.modif()

        inst = LucteriosInstance("inst_b", self.path_dir)
        inst.read()
        self.assertEqual(("sqlite", {}), inst.database)
        self.assertEqual("lucterios.standard", inst.appli_name)
        self.assertEqual(('lucterios.dummy',), inst.modules)

        inst = LucteriosInstance("inst_b", self.path_dir)
        inst.refresh()