http://hg.code.sf.net:8000/p/roundup/code/atom-log/tip/test/test_demo.py Mercurial Repository: p/roundup/code: test/test_demo.py history 2024-10-22T12:03:34+02:00 [permission-performance] Fix dbm filename issue http://hg.code.sf.net:8000/p/roundup/code/#changeset-618dccf7199df7a91734bb03f5a1a67d9ec5a2f3 Ralf Schlatterbeck rsc@runtux.com 2024-10-22T12:03:34+02:00 2024-10-22T12:03:34+02:00
changeset 618dccf7199d
branch permission-performance
bookmark
tag
user Ralf Schlatterbeck <rsc@runtux.com>
description Fix dbm filename issue

Different versions of dbm implementations use different file names.
files
issue2551334 - get test suite running under windows http://hg.code.sf.net:8000/p/roundup/code/#changeset-5b47966bf6f0d0a114b884c7f635368df5f6982f John Rouillard rouilj@ieee.org 2024-04-28T09:17:12-04:00 2024-04-28T09:17:12-04:00
changeset 5b47966bf6f0
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description issue2551334 - get test suite running under windows

Support dumbdbm on windows.
files
test: actually test output from running demo server code http://hg.code.sf.net:8000/p/roundup/code/#changeset-5b1163dca9e15d04326eb5f257eb4da4d287e484 John Rouillard rouilj@ieee.org 2023-11-20T21:59:40-05:00 2023-11-20T21:59:40-05:00
changeset 5b1163dca9e1
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description test: actually test output from running demo server code

I was invoking demo mode, but not testing the output to verify it was
making it to the point where it would start the server.

Check that an expected database file was created to verify that the db
setting was honored.

Also test TEMPLATE-INFO.txt to verify that the correct template was
being instantiated.

Tested under 3.13 as wel using docker command line (wrapped):

docker run -it -u 1000 --rm -v $PWD:/usr/src/myapp -w
/usr/src/myapp python:3.13.0a1-alpine3.18 sh -c 'export
HOME=/tmp/home; mkdir $HOME; python -m pip install pytest
pytest-env requests jinja2; python -m pytest -v test/test_demo.py'

If demo mode tries to start as root, it exits with an error, so it
must be run with -u uid.
files
test: limit search for \r to first 100 bytes. http://hg.code.sf.net:8000/p/roundup/code/#changeset-859c57bc8d9189fef8064ae4b263296731b51d60 John Rouillard rouilj@ieee.org 2023-07-24T21:24:07-04:00 2023-07-24T21:24:07-04:00
changeset 859c57bc8d91
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description test: limit search for \r to first 100 bytes.

Don't scan entire file. just look at 100 bytes which should include
all of the first line.
files
test: fix failure under cygwin python caused by line endings http://hg.code.sf.net:8000/p/roundup/code/#changeset-227aca44fea5a7d194dc8b19a719d92595f04f51 John Rouillard rouilj@ieee.org 2023-07-24T21:16:41-04:00 2023-07-24T21:16:41-04:00
changeset 227aca44fea5
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description test: fix failure under cygwin python caused by line endings

reading config.ini files under cygwin python results in \r\n
terminated lines which do not compare properly with the success
conditions.

replace \r\n with \n when required.
files
test: do not run jinja2 demo test if jinja2 missing. http://hg.code.sf.net:8000/p/roundup/code/#changeset-4cfaddc2d53ef6095c70558eeb205106c8ac3138 John Rouillard rouilj@ieee.org 2023-07-24T18:05:48-04:00 2023-07-24T18:05:48-04:00
changeset 4cfaddc2d53e
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description test: do not run jinja2 demo test if jinja2 missing.
files
test cleanup. Make test method and convert tests to use. http://hg.code.sf.net:8000/p/roundup/code/#changeset-77eb1a41fc061bd684173c15ff54de5d2f85e1f3 John Rouillard rouilj@ieee.org 2022-06-22T16:18:46-04:00 2022-06-22T16:18:46-04:00
changeset 77eb1a41fc06
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description test cleanup. Make test method and convert tests to use.
files
issue2551179 Load config_ini.ini ... recognize minimal template demo.py http://hg.code.sf.net:8000/p/roundup/code/#changeset-5a3a386aa8e71230e45d3f195e95deb552bb6ae4 John Rouillard rouilj@ieee.org 2021-12-09T15:26:39-05:00 2021-12-09T15:26:39-05:00
changeset 5a3a386aa8e7
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description issue2551179 Load config_ini.ini ... recognize minimal template demo.py

Mostly taken from patch by John Kristensen (jerrykan).

Tests for python3 and 2 created for minimal and jinja2 templates.

Removed FIXME for special case config settings for jinja and
responsive templates. config_ini.ini mechanism makes it obsolete.

Demo removes config_ini.ini file in home directory.

Also remove encoding of utf-8 from initial_data.py to remove

SyntaxError: encoding declaration in Unicode string

under python2.
files
BAsic test of demo and server intialization. http://hg.code.sf.net:8000/p/roundup/code/#changeset-3e33b22a315844f6f617645da8ddbf4dd0181e84 John Rouillard rouilj@ieee.org 2021-02-05T00:09:08-05:00 2021-02-05T00:09:08-05:00
changeset 3e33b22a3158
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description BAsic test of demo and server intialization.

This needs more work. I exit the server by hacking serve_forever to
raise a KeyboardInterrupt. Otherwise the test just hangs.

I need a replacement that exits after one (or more configurable)
connections and some way to background the server so the test can
make the connections to the running server instance.
files