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

Vitor Baptista vitor at vitorbaptista.com
Thu Mar 7 22:57:51 UTC 2013


Hi Genhan,

Is the code you're working on available on github?

Cheers,
Vítor.

2013/3/7 Genhan Chen <genhan.chen at azgs.az.gov>

> 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
>
>
> ______________________________**_________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/**listinfo/ckan-dev<http://lists.okfn.org/mailman/listinfo/ckan-dev>
> Unsubscribe: http://lists.okfn.org/mailman/**options/ckan-dev<http://lists.okfn.org/mailman/options/ckan-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130307/0e3db19b/attachment-0001.html>


More information about the ckan-dev mailing list