Hi Benoit,
Il giorno mar, 02/08/2011 alle 14.34 -0400, Benoit Thiell ha scritto:
> I am rewriting search_engine_utils.get_fieldvalues to provide a
> fallback method if the bibxxx tables have not been populated at upload
> time. I wonder now what would be the best way to test this method as
> the tests would rely on the state of the database.
>
> Can I expect that the database is initialized to the demo site? Or is
> there another way for me to test the correctness of this widely-used
> function?
in general, Invenio's testsuite, and in particular the regression tests
do indeed expect to be run on a fully deployed demo site running if
possible the Atlantis Institute of Fictive Science.
So since your method is relying on the DB, the best thing would be to
put its tests somewhere in websearch_regression_tests.py
Cheers!
Sam
--
Samuele Kaplun
Invenio Developer ** <http://invenio-software.org/>