Here, I'm checking the associated gpg-key with product after deleting it. So the expected output should be ' '. However in tests I'm validating this with assertIsNone. So I returned 'None'. 

yeah, for else part, we can raise an exception. I'll update it.