Example #1
0
    def test_write_file(self):
        Model.process = lambda _: 0

        with fake_project():
            self.config.parseOptions(['model', 'test_model', 'test'])
            model = Model(self.config)
            model._write_model()
            model_file = filepath.FilePath('application/model/test_model.py')

            self.assertTrue(model_file.exists())
            model_file.remove()
    def test_write_file(self):
        Model.process = lambda _: 0

        with fake_project():
            self.config.parseOptions(['model', 'test_model', 'test'])
            model = Model(self.config)
            model._write_model()
            model_file = filepath.FilePath(
                'application/model/test_model.py'
            )

            self.assertTrue(model_file.exists())
            model_file.remove()
Example #3
0
    def test_write_file(self):
        Model.process = lambda _: 0

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

        self.config.parseOptions(['model', 'test_model', 'test'])
        model = Model(self.config)
        model._write_model()
        model_file = filepath.FilePath('application/model/test_model.py')

        self.assertTrue(model_file.exists())
        model_file.remove()

        os.chdir(currdir)
Example #4
0
    def test_write_file(self):
        Model.process = lambda _: 0

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

        self.config.parseOptions(['model', 'test_model', 'test'])
        model = Model(self.config)
        model._write_model()
        model_file = filepath.FilePath(
            'application/model/test_model.py'
        )

        self.assertTrue(model_file.exists())
        model_file.remove()

        os.chdir(currdir)