[Koha-bugs] [Bug 10289] UT: Reserves.t needs to create its own data

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jul 8 16:20:32 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10289

Galen Charlton <gmcharlt at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gmcharlt at gmail.com

--- Comment #13 from Galen Charlton <gmcharlt at gmail.com> ---
(In reply to Jonathan Druart from comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > (In reply to comment #6)
> > > > I'm still getting failures:
> > > 
> > > Are these tests pass with the master's ut file?
> > 
> > No. Isn't that the point of the patch, that the unit tests should pass even
> > if there isn't any data for them?
> 
> Yes of course, but in fact the only data I create is the borrower. So if the
> DB contains at least 1 borrower, this patch is useless.

That's a little too strong of a requirement, IMO, as I, for one, and I suspect
most developers, would like to be able to run the DB-dependent tests in our
normal testing databases.

I rather suspect what Jared is running into is that his test database already
has a patron whose cardnumber is CARDNUMBER42.

I think that the requirement that tests should "create their own data" has a
more general expression: "tests should make as few assumptions about the state
of the database as possible".  What this means in this specific case is that
the cardnumber for the patron created for this test should be set in such a way
as to be guaranteed unique for that test run.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list