Exemplo n.º 1
0
    def test_write_file_with_controller(self):
        View.process = lambda _: 0

        with fake_project():
            self.config.parseOptions(['view', 'test_view', 'dummy'])
            view = View(self.config)
            view._write_view()
            view_file = filepath.FilePath(
                'application/view/Dummy/test_view.html')

            self.assertTrue(view_file.exists())
            view_file.remove()
Exemplo n.º 2
0
    def test_write_file_with_controller(self):
        View.process = lambda _: 0

        with fake_project():
            self.config.parseOptions(['view', 'test_view', 'dummy'])
            view = View(self.config)
            view._write_view()
            view_file = filepath.FilePath(
                'application/view/Dummy/test_view.html'
            )

            self.assertTrue(view_file.exists())
            view_file.remove()
Exemplo n.º 3
0
    def test_write_file_with_controller(self):
        View.process = lambda _: 0

        currdir = os.getcwd()
        os.chdir('../mamba/test/dummy_app/')

        self.config.parseOptions(['view', 'test_view', 'dummy'])
        view = View(self.config)
        view._write_view()
        view_file = filepath.FilePath('application/view/Dummy/test_view.html')

        self.assertTrue(view_file.exists())
        view_file.remove()

        os.chdir(currdir)
Exemplo n.º 4
0
    def test_write_file_with_controller(self):
        View.process = lambda _: 0

        currdir = os.getcwd()
        os.chdir('../mamba/test/dummy_app/')

        self.config.parseOptions(['view', 'test_view', 'dummy'])
        view = View(self.config)
        view._write_view()
        view_file = filepath.FilePath(
            'application/view/Dummy/test_view.html'
        )

        self.assertTrue(view_file.exists())
        view_file.remove()

        os.chdir(currdir)