omaciel/robottelo — pull request #1237 by Ichimonji10 (2014-08-25 14:48:02+00:00)
Title: Add a test subscribing a system to a content view

Add a new test module: `tests.foreman.api.test_contentview_v2`. Add a test to
this module which does the following:

1. Create an organization, lifecycle environment and content view.
2. Publish the newly created content view.
3. Promote the newly published content view.
4. Create a system which references the organization, lifecycle environment and
content view.

Make `ContentView.publish` raise an exception if an HTTP 4XX or 5XX response is
received. Otherwise, return a response with the JSON already decoded. Update
`tests/foreman/smoke/test_api_smoke.py` to deal with the change.

Addresses #691. Inspired by #1225, #1205, #1203 and #1197.