SatelliteQE/robottelo — pull request #1619 by Ichimonji10 (2014-10-24 16:30:01+00:00)
Title: Skip failing activation-key tests

Creating an activation key with these options fails, as it should:

* max_content_hosts=-5
* max_content_hosts='ABcd37'

However, creating an activation key with these options succeed:

* unlimited_content_hosts=True, max_content_hosts=-5
* unlimited_content_hosts=True, max_content_hosts='ABcd37'
* unlimited_content_hosts=True, max_content_hosts=5

As demonstrated above, the API allows an invalid value for the
`max_content_hosts` argument when `unlimited_content_hosts` is true. When this
occurs, the `max_content_hosts` option is entirely ignored. Here's a concrete
example:

>>> attrs = entities.ActivationKey(
... max_content_hosts='ABcd37',
... unlimited_content_hosts=True
... ).create()
>>> for attr in ('max_content_hosts', 'unlimited_content_hosts'):
... print(attrs[attr])
...
None
True

See bugzilla bug 1156555 for more information. Skip tests due to this bug:

$ nosetests tests/foreman/api/test_activationkey.py -m test_negative_create_3
SSS
----------------------------------------------------------------------
Ran 3 tests in 0.518s

OK (SKIP=3)