def test_distributor_removed(self, mock_http, mock_https, mock_master, remove_cert):
        mock_http.return_value = os.path.join(self.working_dir, 'http')
        mock_https.return_value = os.path.join(self.working_dir, 'https')
        mock_master.return_value = os.path.join(self.working_dir, 'master')
        os.makedirs(mock_http.return_value)
        os.makedirs(mock_https.return_value)
        os.makedirs(mock_master.return_value)
        os.makedirs(os.path.join(self.working_dir, 'working'))
        test_distributor = YumHTTPDistributor()
        repo = Mock()
        repo.id = 'bar'
        repo.working_dir = os.path.join(self.working_dir, 'working')
        config = {}
        test_distributor.distributor_removed(repo, config)

        self.assertEquals(0, len(os.listdir(self.working_dir)))

        remove_cert.assert_called_with(repo, config)