[Pulp-list] "clean()" methods

Jay Dobies jason.dobies at redhat.com
Tue Mar 1 19:28:24 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.



- -- 
Jay Dobies
RHCE# 805008743336126
Freenode: jdob
http://pulpproject.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNbUjYAAoJEOMmcTqOSQHCJdoIAIAwRfaYulzZD/zK8bDgtLM6
Nnn+ZCYB1Q0Kx6Q/TTeQwqEpyuPbvYbYwgjH5j2PkCYdToYCD0BhhIY56X0Unnc1
vQ88KACcVcQWwbxs+P7SA7mocojAz+xOKKleIlDfukfXUojaKVq2TB8noQbofOQF
vUMvBg8SAz3Jlmp1eH8DF7O5lJEu1gDoS9j24p9i6gwaivbLjxn81X/dLkA6LAvP
1ViWKgRrwsAIeOIy68AprRmRLj8lpvkOqp/MmV20BrSD01+pRupwordgnYiZMmFg
xFfJCB+RUu/9SyWPZRy0wXz/UQ8uTWs9QQYvGe5GBV3PlszIlw7LmJ6qzpVIBoA=
=sSig
-----END PGP SIGNATURE-----




More information about the Pulp-list mailing list