[ckan-dev] Create a temporary database for CKAN plugin nose tests

Toby Dacre toby.okfn at gmail.com
Mon Feb 25 08:51:10 UTC 2013


On 25 February 2013 07:51, Nigel Babu <nigel.babu at okfn.org> wrote:

> Hi Genhan,
>
> Does the setup and teardown methods[1] in the core CKAN tests help you
> create/drop a temporary database for testing?
>
> [1]
> https://github.com/okfn/ckan/blob/master/ckan/tests/models/test_group.py#L9
>
>
> On 23 February 2013 00:41, Genhan Chen <genhan.chen at azgs.az.gov> wrote:
>
>> Hello,
>>
>> Does CKAN provide a mechanism to create/drop a temporary database for its
>> nose tests? I would like to test our plugin in a temporary CKAN database.
>>
>
I believe you can specify the database to use in the .ini file given to
nosetests but the test do not drop/create the database.  They will
drop/create tables in the database though.  dropping/creating databases
require elevated permissions.

Toby


>> Thanks,
>>
>> --
>> 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>
>>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130225/eb0b6e9f/attachment-0001.html>


More information about the ckan-dev mailing list