omaciel/robottelo — pull request #1225 by AdamSaleh (2014-08-22 18:00:06+00:00)
Title: test_cv_subscribe_system

Lets have another round and hopefuly prevent another bazzillion comments :-) :

1) if you think that I should split some stuff into separate pull requests, tell me a.s.a.p.
2) if you thing that test_cv_subscribe_system attempts to test too much at once and I should first port the old promote/publish api tests before this one, tell me as well.

But I'd like to have this thing merged and then to move on to the rest of content-view stuff :-)

Apart of the test_cv_subscribe_system, this pull request contains two attempts at refactoring:

1) refactoring of error handling in ```status_code_error``` in robottelo.api.utils (that did mostly formatting) to ```parse_json``` that throws exception, if passed ```response``` with errors and using this new function in entities to simplify error handling.

```status_code_error``` now uses the ```parse_json``` under the hood.

2) refactoring the ```_search``` method in tests.foreman.smoke.test_api_smoke, to an utility function ```entity_search``` in robottelo.api.utils. I use it to search for ContentViewVersions. It has #FIXME for future reference, once we have some search capabilities in factory.