Mercurial > p > roundup > code
view test/test_jinja2.py @ 7340:7b9bddda9d2d
Add support for demo mode in docker.
roundup/demo.py
Make changes to allow exposed port in docker to be specified
separately from the port that demo mode binds to. Also permit
bind address specification as well.
roundup/scripts/roundup_demo.py:
Update required by changes in demo.py. Also move away from
positional arguments to prefer flag arguments. Required for
passing port and host specification. Flake8 fixes.
share/man/man1/roundup-demo.1
Document use of option flags rather than positional
params. Other cleanups.
doc/installation.txt:
Document new docker modes: demo, shell and admin.
Update docs:
overview section - reorg, added template info
for the impatient section - added docker demo mode reference,
more docs on top level demo.py use.
new section on docker demo mode
removed getting roundup section. folded into installing roundup.
also prior for the impatient section describes how to download.
install via pip in venv recommended supported method
document all provided templates. not just minimal and classic.
added index references.
move sections around, decreased sectin depth, reformatting
scripts/Docker/roundup_healthcheck:
When running roundup-demo, there is no tracker spec. So default to
demo if no tracker=directory args found. Prevent's docker from
reporting an unhealthy container when running demo.
scripts/Docker/roundup_start:
implement demo, shell, admin docker modes.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 14 May 2023 09:43:53 -0400 |
| parents | d26921b851c3 |
| children |
line wrap: on
line source
#-*- encoding: utf-8 -*- """ Testing the jinja2 templating engine of roundup-tracker. Copyright: 2016 Intevation GmbH. Author: Bernhard E. Reiter <bernhard@intevation.de> This module is Free Software under the Roundup licensing of 1.5, see the COPYING.txt file coming with Roundup. Just a test file template for now. """ import shutil # only, needed for tearDown. TODO: Remove when refactored. import unittest from . import db_test_base TESTSUITE_IDENTIFIER='jinja2' class TestCase_Zero(unittest.TestCase): def test_zero(self): self.assertEqual(True, True) class Jinja2Test(object): """Sets up and tears down an instance with database contents. Setup and teardown modelled after the use of db_test_base by several modules like test_xmlrpc and test_userauditor. TODO: Should probably be moved to a base case in db_test_base.py. """ backend = None # can be used to create tests per backend, see test_xmlrpc def setUp(self): self.dirname = '_test_' + TESTSUITE_IDENTIFIER self.instance = db_test_base.setupTracker(self.dirname, self.backend) self.db = self.instance.open('admin') def tearDown(self): self.db.close() try: shutil.rmtree(self.dirname) except OSError as error: if error.errno not in (errno.ENOENT, errno.ESRCH): raise def test_zero(self): """Do nothing just make sure that setup and teardown works.""" pass # only using one database backend for now, not sure if doing all # backends will keep the test focussed enough to be useful for the used # computing time. Would be okay to change in the future. class anydbmJinja2Test(Jinja2Test, unittest.TestCase): backend = 'anydbm' # vim: ts=4 et sts=4 sw=4 ai :
