websauna.tests.cookiecutter.test_cookiecutter_websauna_app module

Test the creation of a new websauna application, using cookiecutter templates.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.MODELS_PY = '\nfrom websauna.system.model.meta import Base\nfrom sqlalchemy import Column\nfrom sqlalchemy import Integer\nclass MyModel(Base):\n __tablename__ = "mymodel"\n id = Column(Integer, autoincrement=True, primary_key=True)\n'

Migration test file

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.dev_db(request, ini_settings)[source]

Create PostgreSQL database myapcdp_dev and return its connection information.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.execute_app_command(cmdline, folder, timeout=15.0, wait_and_see=None, assert_exit=0)[source]

Execute a command inside the application venv.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.execute_ws_command(cmdline, folder, timeout=15.0, wait_and_see=None, assert_exit=0)[source]

Execute a websauna command inside the application venv.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.start_pserve(scaffold)[source]
websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_app_sanity_check_fail(app_scaffold, dev_db)[source]

Create an application and see we don’t start if migrations are not run.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_app_syncdb(app_scaffold, dev_db)[source]

Create an application and see if database is correctly created.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_create_table(app_scaffold, dev_db)[source]

Test ws-create-table command.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_create_user(app_scaffold, dev_db, browser)[source]

Test creating user from command line and logging in as this user.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_db_shell(app_scaffold, dev_db)[source]

Create an application and see if db-shell is started.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_dump_db(app_scaffold, dev_db)[source]

Test database dump.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_gitignore(app_scaffold, dev_db)[source]

We construct a proper .gitignore file for the project.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_migration(app_scaffold, dev_db)[source]

Create an application, add a model and see if migrations are run.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_pserve(app_scaffold, dev_db, browser)[source]

Create an application and see if pserve starts.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_pyramid_debugtoolbar(app_scaffold, dev_db, browser)[source]

Pyramid debug toolbar should be effective with the default development pserve.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_sanity_check(app_scaffold, dev_db)[source]

Test sanity check command.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_sdist(app_scaffold)[source]

Create an application and see if sdist egg can be created.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_shell(app_scaffold, dev_db)[source]

Create an application and see if shell is started.

websauna.tests.cookiecutter.test_cookiecutter_websauna_app.test_tweens(app_scaffold, dev_db)[source]

Test tweens command.