omaciel/robottelo — pull request #729 by omaciel (2014-04-17 16:05:26+00:00)
Title: Fixed failing CLI Organization tests.

There were two CLI Organization tests that were failing for a couple of
reasons.

The tests were adding or removing a lifecycle environment to an
organization. Some of the assertions were calling Lifecycle.list to make
sure that the right number of environments were present, but contrary to
most resources, Lifecycle does not take a per-page argument.

Therefore, the List method in Base.py for CLI now takes an optional
per_page argument with a default of True.

LifecycleEnvironment overrides this list method, passing per_page=False
by default.

There was also a typo in one of the tests where 'organization' was
spelled 'oraganization'.

Finally, one of the LifecycleEnvironment.list calls was passing the
organization-id outside the expected options dictionary.

The two failing tests are now passing.

```bash
$ nosetests -c robottelo.properties tests/foreman/cli/test_org.py:TestOrg.test_add_environment tests/foreman/cli/test_org.py:TestOrg.test_remove_environment

@Test: Check if an environment can be added to an Org ... ok
@Test: Check if an Environment can be removed from an Org ... ok

----------------------------------------------------------------------
XML: foreman-results.xml
----------------------------------------------------------------------
Ran 2 tests in 53.412s

OK
```