encadre

Encadre, petit framework web Python (Flask) : contrôleurs en greffons, validation, tests
git clone https://git.schurger.org/encadre.git
Log | Files | Refs

test.py (725B)


      1 import unittest
      2 from encadre import Encadre
      3 from encadre.framework import framework_from_config
      4 from encadre.controllers import load_controllers
      5 
      6 
      7 class EncadreFlask(Encadre):
      8 
      9     application = 'encadre_test_app'
     10 
     11     def __init__(self):
     12         Encadre.__init__(self, None)
     13         self.framework = framework_from_config(self.application,
     14                                                {self.application:
     15                                                 {'framework': 'flask'}})
     16         load_controllers(self.framework, self.application)
     17 
     18 
     19 class TestEncadreFlask(unittest.TestCase):
     20 
     21     def setUp(self):
     22         self.encadre = EncadreFlask()
     23 
     24     def test_setup_routes(self):
     25         self.encadre.framework._setup_routes()