[ckan-dev] 'CreateTestData' redefines tables in memory for nosetests

Genhan Chen genhan.chen at azgs.az.gov
Thu Mar 7 22:37:06 UTC 2013


When I run nose tests like "nosetests --ckan 
--with-pylons=test-core.ini", the program will run "load_environment.py" 
twice. This causes the issue below.

Does anyone have a good solution?


On 3/5/2013 2:53 PM, Genhan Chen wrote:
> After 'from ckan.tests import CreateTestData' is added for my 
> nosetests, I find the following error:
>
>     ERROR: Failure: InvalidRequestError (Table 'harvest_node' is 
> already defined for this MetaData instance.  Specify 
> 'extend_existing=True' to redefine options and  columns on an existing 
> Table object.)
>
> The nosetests command is "nosetests --ckan --with-pylons=test-core.ini".
>
> Does anyone know how that happens?
>


-- 
Genhan Chen

Arizona Geological Survey
http://www.azgs.az.gov/

Phone: 520-209-4136
Email: genhan.chen at azgs.az.gov
  





More information about the ckan-dev mailing list