def test_build_boot_main(): main = BootFlaskProject("olamundo") main.create() assert main.name == "" assert os.path.isdir("olamundo") assert str(main) == "olamundo" main.destroy()
def test_build_boot_flask_app(): main = BootFlaskProject("hello") main.create() app = BootFlaskApp("hello", stop=False) app.write() assert app.__name__ == "app.py" assert os.path.isfile('hello/app.py') app.remove() main.destroy()
def test_build_boot_directories(): main = BootFlaskProject("helloworld") main.create() static = BootFlaskStatic("helloworld") static.create() assert static.name == "static" assert os.path.isdir("helloworld/static") static.destroy() main.destroy()
def test_requirements(): main = BootFlaskProject("anything") main.create() app = BootFlaskRequiriments("anything", stop=False) app.write() assert app.__name__ == "requirements.txt" assert str("Flask") in app.__doc__ assert os.path.isfile('anything/requirements.txt') app.remove() main.destroy()
def test_scaffold(): project = BootFlaskProject("blog") project.add(BootFlaskStatic, BootFlaskTemplates.add(BootFlaskHtmlIndex)) project.go() assert os.path.isdir("blog") assert os.path.isdir("blog/static") assert os.path.isfile("blog/templates/index.html") project.destroy()
def test_scaffold(): project = BootFlaskProject("blog") project.add( BootFlaskStatic, BootFlaskTemplates.add(BootFlaskHtmlIndex) ) project.go() assert os.path.isdir("blog") assert os.path.isdir("blog/static") assert os.path.isfile("blog/templates/index.html") project.destroy()