candlepin/subscription-manager — pull request #338 by dgoodwin (2012-10-15 14:47:49+00:00)
Title: 865590: Fix broken offline unsubscribe.

This bug was actually caused by a recent fix for 852630, where to
prevent a duplicate attempt to clean up an expired cert we do an update
without first checking if we're even registered anywhere.

Instead we should just not duplicate attempts to delete a cert which is
both no longer reported by the server, and expired by refreshing the
entitlement directory if we've deleted anything.

Cleanup some unclear methods in UpdateAction.

Attempted to add tests but too difficult to mock an entitlement
directory (which is a stub of the real thing) changing midway through
the call we're testing.