def test_delete_confirmed(self, mock_input): owner = 'foo' package = 'bar' mock_input.return_value = '%s/%s' % (owner, package) delete_url = "%s/api/package/%s/%s/" % (command.get_registry_url(), owner, package) self.requests_mock.add(responses.DELETE, delete_url, json.dumps(dict())) command.delete('%s/%s' % (owner, package))
def test_delete_not_confirmed(self, mock_input): mock_input.return_value = 'blah' command.delete('user/test')