:date: 2021-02-15 ========================= Monday, February 15, 2021 ========================= In demo project lydia, "pm test tests.test_ipdict" passed, but "pm test" failed. Which indicated that test_ipdict.py somehow depends on the other test cases. This caused an avalanche of changes in the test suite. I also learned a few things. Lino has a new :term:`django-admin command` :manage:`demotest`. The Django docs warns "If your tests rely on database access such as creating or querying models, be sure to create your test classes as subclasses of django.test.TestCase rather than unittest.TestCase." I thought that when I don't use django.test.TestCase, my test will use the database defined in the manage.py file (i.e. the prepared demo data). So it seems that the Django tests in the demo projects (= run using :manage:`test` from a demo project directory, not using :cmd:`inv test` from the repository root) actually never use the database that has been prepared with :cmd:`pm prep`. I thought that the WebIndexTestCase does this. But seems that I was wrong. The new :term:`django-admin command` :manage:`demotest` replaces what has previously been done by :xfile:`test_webindex.py` and :file:`test_ipdict.py`. I removed these files from all projects. It is now being called in the :xfile:`test_demo.py`, which I added to some repositories. E.g. we now also have such a file in welfare, amici, algus, mentori and others. The test suite in welfare and amici did not run :manage:`test` in their demo projects. Seems that they have been sleeping for quite long. Now they are back But two of them were using :meth:`lino.api.doctest.check_callback_dialog`, and I didn't yet manage to get this back to work. I marked them as skipped. The new :manage:`demotest` command also unveiled a series of deprecation warnings, which I fixed. I had not seen them before because usually they are disabled. I rediscovered two tested docs that hadn't yet been moved to the docs tree in book: :ref:`lino.tutorials.myroles` and :ref:`lino.tutorial.auto_create`.