[ckan-dev] test failures
Seb Bacon
seb.bacon at gmail.com
Fri Feb 4 13:48:17 UTC 2011
On 4 February 2011 13:41, David Read <david.read at okfn.org> wrote:
> Seb,
> Thanks for explaining further - it is useful to see why you took it in this
> direction.
> Is see now that you are concerned about 'add_initial_data' which init_db
> calls to create two pseudo-user objects. This is not sample or test data,
> but how we've designed the user/authorization system to work. Because these
> items are created with the tables at all times, and never changed, there is
> no need to test the state of tables existing, but these items not existing.
> In fact, there isn't an occasion in ckan code where the db hasn't been
> initialised with init_db (aside from a few lines in the model before set-up
> has occurred). So this 'norm' is the environment which tests should run in
> as well. A perfectly reasonable 'assumption' I feel, although if this hasn't
> been documented then I can understand wanting to avoid this or other
> assumptions.
Fair enough.
Seb
> So I think there is little gained in ensuring every test starts from a
> table-less database and forcing tests to run init_db. Well maybe one or two
> tests should focus on this, but not the majority of tests, which use the
>
More information about the ckan-dev
mailing list