[Pulp-list] "clean()" methods
jason.dobies at redhat.com
Tue Mar 1 19:28:24 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
On 03/01/2011 02:26 PM, Jay Dobies wrote:
> We have them in BaseAPI to delete all collections the API is tied to.
> Anyone mind if I start to move those to the model objects themselves?
> Conceptually it makes more sense in a unit test to say "Consumer -
> delete all of those between tests."
Changed my mind. Turns out the clean() method is as simple as
collection.remove(). I had seen elsewhere to iterate over each
collection calling remove and that's the functionality I wanted to
migrate. But if it's that simple, no need to clog up the model with the
simple chain down to the collection method.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the Pulp-list