Deduplicate test data

Create function `_test_data` in module `tests.foreman.api.test_repository`. Use
this function to feed data to several DDT data decorators, like this:

    @ddt.data(*_test_data())
    def test_foo(self, data):
        ...

This allows test data to be written out once within the body of that function
and then re-used in several places.
Fixed UI smoke tests: failing while creating new org since edit flag was set to true default
Merge pull request #1734 from Ichimonji10/test-repository

Deduplicate test data
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
Merge pull request #1736 from Ichimonji10/delete-raw

Update EntityDeleteMixin, change _poll_task args
Skip tests that fail due to BZ 1166365

Deleting a repository is an asynchronous task, and there's no way to monitor the
progress of the deletion except by polling to see if that repository still
exists. This is problematic, and it's exacerbated by the fact that the task can
take a significant (10+ seconds) amount of time. When a client deletes a
repository, the server should either block until the deletion is done, or it
should return a task that can be monitored.

Here's a simple script that I've used to test this issue (it depends on some robottelo code):

    #!/usr/bin/env python2
    from robottelo.entities import Repository
    from time import sleep
    repo_id = Repository().create_json()['id']
    repo = Repository(id=repo_id)
    print('Target: 200, actual: {0}'.format(repo.read_raw().status_code))
    repo.delete()
    print('Target: 404, actual: {0}'.format(repo.read_raw().status_code))
    sleep(10)
    print('Target: 404, actual: {0}'.format(repo.read_raw().status_code))

And here's some output I've received:

    Target: 200, actual: 200
    Target: 404, actual: 200
    Target: 404, actual: 500
Merge pull request #1739 from sghai/smoke-fixes

Fixed UI smoke tests
Merge pull request #1741 from Ichimonji10/bz-1166365

Skip tests that fail due to BZ 1166365
Tweak smoke test "get_api_links"

Make the errors produced by the test more useful. For example, this comparison:

    assertEqual(frozenset(foo.keys()), frozenset(bar.keys()))

produces much nicer error messages than this comparison:

    for k in foo.keys():
        self.assertIn(k, bar)

Rename several variables for the sake of clarity. For example, use this
assertion:

    self.assertEqual(
        frozenset(api_paths[group]),
        frozenset(API_PATHS[group])
    )

Instead of this assertion:

    self.assertEqual(frozenset(paths), frozenset(API_PATHS[category]))
Update robottelo's list of API paths

Several new API paths have been added.

* @cfouant can vouch for the `activation_keys` paths.
* jsherrill can vouch for the new `errata` path.
* mmccune can vouch for the new `mail_notifications` paths.
* partha can vouch for the `docker_images` and `docker_tags` paths.

There is a bug in apipie, so these paths differ from what the server currently
returns. This bug is described in BZ 1166875. Make the test code accomodate this
bug.
Merge pull request #1742 from Ichimonji10/new-api-paths

Update smoke tests for API paths
Added Submition validation for sync_plan tests.

Upon submission of any page, there is a chance that the validation
of data may fail and hence the entity creation too fails.

The idea is to check for the submit/create/save locators after the
submission of page. If these locators still exist on the page then
the validation fails.

Added a submit_validate flag so that we have a choice to validate
whether submission was successful. This needs to be used for all
the negative tests, as submission would always fail for them.

submit_validate flag is set to True by default.
Needs to be set to false for all negative tests.
Merge pull request #1737 from kbidarkar/submit_validate

Added Submition validation for sync_plan tests.
Sync plan locator fixes and increased the manifest upload timeout.

Uploading a manifest is too time consuming, hence the increase in
timeout.

Sync-plan related locators are now updated for the upstream builds.
Merge pull request #1743 from kbidarkar/locator-fixes

Sync plan locator fixes and increased the manifest upload timeout.
Added bug to docker related  repository tests.
Reference a different bugzilla bug

BZ 1163494 has been closed as a duplicate of BZ 1166365. Change a reference to
the former into a reference to the latter.
check whether the UI page is refreshed properly after manifest is deleted
Merge pull request #1746 from Ichimonji10/bz-1166365

Reference a different bugzilla bug
Merge pull request #1744 from kbidarkar/fix-repos

Added bug to docker related  repository tests.