def test_write_file(self): Controller.process = lambda _: 0 with fake_project(): self.config.parseOptions(['controller', 'test_controller']) controller = Controller(self.config) controller._write_controller() controller_file = filepath.FilePath( 'application/controller/test_controller.py') self.assertTrue(controller_file.exists()) controller_file.remove()
def test_write_file(self): Controller.process = lambda _: 0 with fake_project(): self.config.parseOptions(['controller', 'test_controller']) controller = Controller(self.config) controller._write_controller() controller_file = filepath.FilePath( 'application/controller/test_controller.py' ) self.assertTrue(controller_file.exists()) controller_file.remove()
def test_write_file(self): Controller.process = lambda _: 0 currdir = os.getcwd() os.chdir('../mamba/test/dummy_app/') self.config.parseOptions(['controller', 'test_controller']) controller = Controller(self.config) controller._write_controller() controller_file = filepath.FilePath( 'application/controller/test_controller.py') self.assertTrue(controller_file.exists()) controller_file.remove() os.chdir(currdir)
def test_write_file(self): Controller.process = lambda _: 0 currdir = os.getcwd() os.chdir('../mamba/test/dummy_app/') self.config.parseOptions(['controller', 'test_controller']) controller = Controller(self.config) controller._write_controller() controller_file = filepath.FilePath( 'application/controller/test_controller.py' ) self.assertTrue(controller_file.exists()) controller_file.remove() os.chdir(currdir)