def test_delete_missing(self): """ Deleting a missing package raises 400 """ context = MagicMock() context.name = 'pkg1' context.version = '1.1' ret = api.delete_package(context, self.request) self.assertTrue(isinstance(ret, HTTPBadRequest))