SatelliteQE/robottelo — pull request #1736 by Ichimonji10 (2014-11-20 20:13:18+00:00)
Title: Update EntityDeleteMixin, change _poll_task args

Create method `EntityDeleteMixin.delete_raw`. This method is useful when a
client wishes to delete something and get the response object, which contains
information such as a status code and the raw byte response.

Make method `EntityDeleteMixin.delete` act more like other methods that deal
with foreman tasks. It now always returns a dict of data, rather than evaluating
some mildly complex logic and returning either a foreman task ID or None.

Change the arguments to the `robottelo.orm._poll_task` method. Make that method
use `None` as a default argument to several methods instead of concrete values.
This change makes it easier to override that method.

Update the unit tests for `robottelo.orm.EntityDeleteMixin.delete`.

$ nosetests tests/robottelo/
......................................................................................................................................................
----------------------------------------------------------------------
Ran 150 tests in 0.107s

OK

Use method `delete_raw` instead of `client.delete`. Using `delete_raw` allows
for more compact code.

$ nosetests tests/foreman/api/test_multiple_paths.py -m test_delete_status_code
......................
----------------------------------------------------------------------
Ran 22 tests in 31.614s

OK