[Pulp-list] "clean()" methods

Jay Dobies jason.dobies at redhat.com
Wed Mar 2 17:17:25 UTC 2011


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

On 03/02/2011 12:02 PM, Jeff Ortel wrote:
> 
> 
> On 03/01/2011 01:28 PM, Jay Dobies wrote:
> 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.
> 
>> The clean() method is overridden in RepoApi essentially to delete the
>> repo content on the filesystem.  We may have other cases like this.

Ohhhh, interesting. It's still just intended for unit tests right? Or do
you know of any places in the app that we're using it?

> 
> 
> 
>>
_______________________________________________
Pulp-list mailing list
Pulp-list at redhat.com
https://www.redhat.com/mailman/listinfo/pulp-list

> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list


- -- 
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/

iQEcBAEBAgAGBQJNbnulAAoJEOMmcTqOSQHCRaoIAIfygMXx05ZJkylOXOUwC1V5
g2W8Lzc5u/NXCfMsSoj4DthKXruJxq+cMotRyVfsQlCu0hJxTj9atah7Ef9yKwPZ
xTBxdB6GkM5GGVLJr+vahfm2H7mA0i/J+pykEI0TLlA0nY1UUZ2nobTNStgGKZ1W
mLPI9lrphayIv9DyZdyqpZuEcYg5hawVDoXHqo0woYPCNW2MoASbq3s81krIERTE
mnaUAS1QBxLj6hI0sl9bAWhljxT3NOEy2Iji0cChAHIZi8sPeBtEHvO6Z9UCsUxw
5WR3ZB89T3ffnaKAVIKrrHnjQrsRkbdDmFXbaZlszDN2MmwC7YG6c9sTeNiIV5k=
=WVAt
-----END PGP SIGNATURE-----




More information about the Pulp-list mailing list