From 182ee30aa9b23ced7415923452840ffeeee86e2d Mon Sep 17 00:00:00 2001 From: Jeremy Audet Date: Tue, 14 Oct 2014 13:39:00 -0400 Subject: [PATCH] Make the readme a real file, not a symlink The readme should render correctly when processed by rst2html, displayed on GitHub, or read as a standalone file. In contrast, the main body of documentation must be compiled before being read. Split the readme and main body of documentation apart. Add a table of contents to `docs/index.rst`. Fix a random error in `robottelo/orm.py`. --- README.rst | 25 ++++++++++++++++++++++++- docs/index.rst | 35 +++++++++++++++-------------------- robottelo/orm.py | 8 ++++---- 3 files changed, 43 insertions(+), 25 deletions(-) mode change 120000 => 100644 README.rst diff --git a/README.rst b/README.rst deleted file mode 120000 index d46ade85ef0..00000000000 --- a/README.rst +++ /dev/null @@ -1 +0,0 @@ -docs/index.rst \ No newline at end of file diff --git a/README.rst b/README.rst new file mode 100644 index 00000000000..e41a27c1dce --- /dev/null +++ b/README.rst @@ -0,0 +1,24 @@ +Robottelo +========= + +`Robottelo`_ is a test suite which exercises `The Foreman`_. All tests are +automated, suited for use in a continuous integration environment, and `data +driven`_. There are three types of tests: + +* UI tests, which rely on Selenium's `WebDriver`_. +* CLI tests, which rely on `Paramiko`_. +* API tests, which rely on `Requests`_. + +The `full documentation +`_ is available on +ReadTheDocs. It can also be generated locally:: + + pip install -r requirements-optional.txt + make docs + +.. _data driven: http://en.wikipedia.org/wiki/Data-driven_testing +.. _Paramiko: http://www.paramiko.org/ +.. _Requests: http://docs.python-requests.org/en/latest/ +.. _Robottelo: https://github.com/SatelliteQE/robottelo +.. _The Foreman: http://theforeman.org/ +.. _WebDriver: http://docs.seleniumhq.org/projects/webdriver/ diff --git a/docs/index.rst b/docs/index.rst index 842bf147a13..4591a77c7c6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,15 +9,13 @@ driven`_. There are three types of tests: * CLI tests, which rely on `Paramiko`_. * API tests, which rely on `Requests`_. +.. contents:: + Quickstart ========== -The following is only a brief setup guide for `Robottelo`_. More extensive -documentation `is available `_ at -Read the Docs. - -Requirements ------------- +The following is only a brief setup guide for `Robottelo`_. The section on +`Running the Tests`_ provides a more comprehensive guide to using Robottelo. Install Python header files. The package providing these files varies per distribution. For example: @@ -181,25 +179,22 @@ It is possible to run UI tests on a headless server. To do this: This done, UI tests no longer launch a visible web browser. Instead, UI tests launch a web browser within a virtual display. -API Reference -============= - -If you are looking for information on a specific function, class or method, this -part of the documentation is for you. The following is an overview of the topics -covered by the API. For more granular information, follow one of the links. +Miscellany +========== .. toctree:: - :maxdepth: 2 + :hidden: + committing + code_standards + reviewing_PRs api/index -Miscellany -========== - -Want to contribute? Before submitting code, read through the -:doc:`committing guide ` and **Robottelo** :doc:`code standards -`. Ready to start reviewing pull requests? We have :doc:`a -guide ` for that too! +Want to contribute? Before submitting code, read through the :doc:`committing +guide ` and **Robottelo** :doc:`code standards `. +Ready to start reviewing pull requests? We have :doc:`a guide ` +for that too! Finally, the :doc:`API reference ` covers individual +functions, classes, methods and modules. Bugs are listed `on GitHub `_. If you think you've found a new issue, please do one of the following: diff --git a/robottelo/orm.py b/robottelo/orm.py index 8288fadeaba..0cc02590ae2 100644 --- a/robottelo/orm.py +++ b/robottelo/orm.py @@ -473,9 +473,9 @@ class EntityReadMixin(object): def read_raw(self, auth=None): """Get information about the current entity. - Send an HTTP GET request to :meth:`path`. Return the response. Do not - check the response for any errors, such as an HTTP 4XX or 5XX status - code. + Send an HTTP GET request to :meth:`Entity.path`. Return the response. + Do not check the response for any errors, such as an HTTP 4XX or 5XX + status code. :param tuple auth: A ``(username, password)`` tuple used when accessing the API. If ``None``, the credentials provided by @@ -514,7 +514,7 @@ def read(self, auth=None, entity=None, attrs=None): All of an entity's one-to-one and one-to-many relationships are populated with objects of the correct type. For example, if ``SomeEntity.other_entity`` is a one-to-one relationship, this should - return ``True``::' + return ``True``:: isinstance( SomeEntity(id=N).read().other_entity,